Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Unknown Target on June 20, 2007, 03:48:30 am
-
Is it possible to have an external weapon mount that only gets put on when you select a certain weapon?
I.e. is it possible to have this pod get mounted (and obviously NOT fired from the rail) when you select rockets in the tech room:
(http://members.aol.com/ah64info/rocketsi.jpg)
-
Ahem... Did you read what i posted in the earlier conversation?
Also check nukemod as that contains (at least used to) several examples of external (switcheable) gun barrels.
-
I asked Nuke, he said he didn't know how, IIRC.
And no, i don't remember what you said, sorry. :(
-
i remember when the vwep (weapon models) system was being created i asked about rocketpods and iirc, i got a no. anyway as far as i know it never evolved from where it left off. anyway id surely welcome rocket pods. dont break the current features, but you can still add others. one thing id like is for the model to be rendered along the normal for the weapon point its mounted on, and also to be able to have the points on the weapon model itself have normals. scripting access to the weapon models could be cool too :D
-
So does this mean it's not in? :(
-
not yet. but im sure if we bug the coders enough theyd stick it in.
-
With scripting you could simulate this...
Create nontargetable destroyable subsystems for the weapon mount(s). Add a scripting hook to GS_STATE_GAME_PLAY that checks the weapons of every ship and removes the proper subsystems on every ship that doesn't have the weapon for that weapon mount subsystem.
It'd be a pain in the butt, but I'm not sure how efficient loading yet another model and rendering it would be, plus doing collision checking on it.
-
im sure you could. but i really dont have a need for rocket pods (but it is something i would make use of). i was thinking about doing something similar for virtual turrets. but there seems to be a limit on how much script you can run. a hud and a couple other custom features could be added. but after awhile theres some limits on how much you can actually do before you get a slowdown. is there any chance of being able to run script in another thread (or another core incase you have more than one)?
-
We have already devised an alternate solution for the issue which should be adequate for the current need.
-
not yet. but im sure if we bug the coders enough theyd stick it in.
In other words: submit the bugs to mantis, and remind the coders about the fact.
-
We have already devised an alternate solution for the issue which should be adequate for the current need.
you mean to improve script performance? what did i miss? i wish my job would fire me so i could spend time modding again :D
anyway the nukemod features list planned for scripting is rather large. the hud, advanced turrets/blindfire, heavily animated ships, and rtt panels to name a few. all of which will eat the computer by themselves and when grouped together in the same mod will cause slowdowns greater than those of bowel movments at light speed time dialation.
-
Actually it doesn't use scripting at all... Just creative abuse of visible primary mounts/ external secondary weapons thing.
-
ah, so youre using a dummy primary and just sticking the secondary points over the holes for the pod tubes? ah whatever works. i use the existing vwep system for gatling guns and externally mounted missiles. its preferable to me that ships have fewer missiles, and rocket pods are a deviation from that.
anyway by deciding that a certain bank is external, and using divided selection lists, you can implement a system of combined external and internal hardpoints. the first point in the bank is always for a large bomb, with the cargo size equal to the bank size. this ensures that only 1 warhead can be loaded. however if i add additional points, i can create a group of missiles surrounding the central point for big bombs, and i can make the cargo size for those weapons 1/n, n being the cargo size of the big bomb. so lets say i have a fat man at cargo size 50, but i have a smaller missile with a size of 10. on the ship, the first firing point is located right in the middile, this is the only point the bomb will ever touch, but i can place an extra 4 points around it for the smaller missiles. so now the point can handle 2 weapon configs. cool stuff.
you know a cool feature would be weapons subsystems for individual weapon banks or even individual firing points. like you could use a rocket pod subsystem, and if you shoot it, you destry the pod and those points associated with it can no longer be used. if you have 2 pods on the same bank, you can make only the destroyed pod be effected, and if you want to be really advanced, could loose all ammo stored in that pod as well. as a result destroying a pod would also destroy half your ordinance. same with prims, you could shoot off an enemy's guns. or just make the vweps themselves have their own hitpoints.
-
The FS engine isn't designed to do multithreading. Profiling and optimizing the scripting code is a much more realistic possibility.