Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Bobboau on January 13, 2007, 08:49:02 am
-
I'm playing with counter measures right now, makeing a mine variant.
discuss.
-
Mmmmm. Mines.
-
Hmm... missiles using 'gun convergence' and proximity triggers.. Easy to do. Dunno if WMCs new weapon distance measures distance only to the targeted ship but then again i can always use scripted 'weapon detonator'.
-
I have a mine flag now, what should it do though?
right now I have it so it will allow you to shoot your own mine.
and a mine can't blow up another mine if it's on the same team.
-
I think having a mine flag is the problem.
What we want is several flags that all allow the weapon to have different abilities. Some people want mines just as rear firing missiles (Which I believe is now possible by other methods). Some want proximity mines while others want them to home a bit while others want them to be time delayed.
-
all of that, is uneffected by the mine flag, it's mostly there to allow you to lay feilds of them, things like proximety detonate, would be there own seperate thing.
so what makes a mine a mine?
-
Mines would be great :)
I already experimented with that, but reached the code possibilities at one point.
I was able to launch it, and make it approching slowly an enemy (it's actually just a very long living Iff-Missile).
While that works, a mine field itself will become a problem. You could make them a ships.tbl entry and will then have to control each of them to not be visible on the radar (if you want) and to detonate on contact or close distance.
The reason why I stopped was already mentioned above. My minefield always created a chain reaction, when one exploded, the rest followed. Fun to watch, but not really usuable.
When you can make them not to harm other "friendly mines" that would be great. However, you will have to make this a ships flag entry rather than a weapon flag in that case, which is certainly not what you are aiming for, right ?
However, as for minefields, maybe the asteroidfield revamp can be used for that :nervous:
-
see, stuff like that.
-
Maybe mines could be integrated into the asteroids engine?
-
I think there needs to be two kinds of mine. The kind a ship can lay during a fight and the kind that exists as a pre-existing minefield which the game handles.
-
i find in most games that have mines, i find myself not using them. ive however implemented a crude form of mines on some ships in nukemod. they have a missile point in the back of the ship with a reversed normal, the missile has no velocity, a bomb flag and a remote detonate flag. you simply place it and fly off. and detonate it at your leasure. typically youd drop them in front of capships and let them run into them. i make em pretty powerfull as you only get one or two of them. main problem is ai needs to know how to use them. otherwise its just an oddity for the player to goof around with.
now i havent really played around with countermeasures yet. id like to get multiple countermeasure banks each with their own firing points and the ability to select them in loadout. i am making a few mine models at a leisurly pace, but have yet to finish them. might play with mines some more before the next nukemod release. a mine flag woul be a good idea though so long as the ai is coded to understand what that means. but only as an ai thing. other options like remote detonate or group detonate, homing and other stuff should be seprate options.
-
I think there needs to be two kinds of mine. The kind a ship can lay during a fight and the kind that exists as a pre-existing minefield which the game handles.
Exactly. However, the ones that will be fired by a ship are completly doable with table editing (and of course you need a mine model). The only small problem that remains is that for a quarter of a second the mine starts to the front where the firepoints directes.
Here is what I did :
I created a invisible model, which explodes (without a visible explosion) in the moment it is launched, then it spawns a child which is targeting the closest enemy. All you need now is to make this thing really slow and give it a massive lifetime. No target lock required, you can just fire and forget
The same way I did the IFF missiles for WCS. Nothing is more fun than shooting a missile in your flight vector and watching it turning around and killing the enemy that is shooting you from behind :D
But there is need for a way to create a minefield. Two usefull versions come into my mind :
a) Something like the asteroidfield, with selfspawning mines
b) A field with a limited number of mines for "clear minefield" missions.
-
Some mine types -
Sentry Mine:
Fires low powered lasers/missles/whatever at ships in range.
Gravity Mine:
Creates interdicting field of gravity - used for slingshot effects and drawing opponets in/off course.
Stationary Mine:
Sits in one place ready to kill you and prevent passage.
Seeker / Magnet Mine:
Plays follow the leader well - tends to form groups.
Proximity Mine:
Simple - in range detonation.
Remote Mine:
Want the job done right - blow it yourself. :D
Cloaked Mine:
Invisible or partially so.... tends to be placed in critical spots or for covert warfare.
Holo-Mine:
Makes itself look like another ship or object - till you get too close to escape.
All Mine:
Any variation or combination off of one of the above types.
Just some ideas put together for easy of use. :)
-
we have no gravity, and we can't make a weapon fire a weapon (though we can spawn) but everything lese is perfictly doable.
and all we need for a feild is to change the code so it doesn't spawn asteroids but weapons.
-
In that case - why not make a weapon that sets a one time use spawn point for a mine?
-
Gravity can be sort of faked using huge 'blast force' values (positive being pushing and negative pulling).
-
I can think of a lot of mission uses for mines, and they would not need to have a very complex behaviour.
1) Simple contact trigger mines. Lay them in fields to set up defensive fields to protect bases, jump nodes or similar. Missions would be written to deploy or lay the last 'area' to fill in before incoming ships arrive. There would need to be a player de[ployable one as well as a fred placed one. Ideally, you would want them to be relatively powerful and with enough seperation between them to get a good coverage. Chain reaction of minefields is not something that needs to be prevented..... it is a REAL issue if you lay your mines too close together. They would be used for anti-capship defending...not anti-fighter.
2) Proximnity mines. These would have a much lower explosive yield, and could be used either as a defense weapon to seed fields, or as an alternative to 'discourage' enemy fighters from flying up behind you!
In case 2, the AI would need to be able to make some use of them, and would need to think of them as an untargetted rear firing missile. Which, from the above, seems to be the most likely case.
In both types of mines, you would want to have either an EMP type of charge designed to fry shields, or a simple explosive type to damage hulls. Switch loadouts mid mission to get a variety!
The option to self destruct all th mines you laid yourself would also be a good idea. I can imagine the pleasure of laying a nice field of mines and seing that lovely big enemy vessel warping in and running smack into your field of mines ....and hitting the 'detonate' button.
Mines, by definition, are used as a defensive weapon to control and restrict a battlefield. You can mix them up with sentry guns to create choke points and control the attacking forces and bring them into the killing zones. Enemy ships should have a chance of detecting these things and reacting, with some degree of awareness of the danger. If you want ships to hurl themselves onto them in a suicidal way, then I am sure the FRED elements can make them do something stupid like that ;) Detection should only be possible at short range though. Otherwise the things have no purpose.
-
the AI may have some degree of avoidence of them already, they are missles, and I've seen what looked like them purposefuly dogeing running into them.
-
Suggestion: Don't give it a mine flag, give it a "$Proximity Detonation Radius" field or somesuch. To perform mine behavior, you can then just check if the value has been set to something valid (ie greater than or equal to 0) and check if any other objects are within that radius, and then blow the thing up if they are. It's one less thing for table modellers to forget when adding mine properties to a weapon.
I should note that there is a createWeapon flag in scripting...and I think I just fixed the script-eval SEXP. So all you need to do is define a function, and then do
op script-eval
-- "minefield(24,32,8, 5,20,6)"
Which uses createWeapon to randomly spawn weapons within the box defined by those two sets of 3 coordinates.
(Remember, SEXP strings can only be 32 characters in length.)
-
If you are using scripts and weapons for that you might as well create proximity triggers with IFF for mines. Or launchable mines that have activation timers so that they wont kill the launching ship even if the mine would be launched too close to a ship (having hostile IFF).
Only real prob is with AI... perhaps if the launchable mines would be some sort of very slow omnidirectional heat seekers with immensely 'strong' (non-spoofable) seeker
-
I should note that there is a createWeapon flag in scripting...and I think I just fixed the script-eval SEXP. So all you need to do is define a function, and then do
op script-eval
-- "minefield(24,32,8, 5,20,6)"
Which uses createWeapon to randomly spawn weapons within the box defined by those two sets of 3 coordinates.
(Remember, SEXP strings can only be 32 characters in length.)
The problem with random creation via script or SEXP is that you stand a chance of spawning one mine directly on top of another one or inside any other objects you've placed in the target zone. You don't have the game engine working to move anything that is spawned outside the bounding box of anything else already in existence in the same was as you do with the asteroid field code. Now maybe you can make a script that can push and pull mines until they are out of the bounding box but AFAIK you can't with SEXPs or I'd have already made minefields that way already. :)
-
like I said, the mine flag has nothing to do with proximity detonation, it's mostly for dealing with what other objects cause it to blow up, for instance, mines on the same team, shouldn't set each other off.
-
They way I see it:
Mine Type 1 - similar to Countermeasure, classed as weapon
Mine Type 2 - technically a ship, can be single-placed in FRED, as with asteroids
- requires new ship class to recognize various behaviors, some of which JGZinv mentioned (but others would be sexp scripted)
- behaviors would be a combination of data in objecttypes.tbl and options in the ships.tbl to dictate these behaviors to specific classes of mine
Minefield - Uses something possibly similar to asteroid field code (possibly incorporated into asteroids.tbl) and FRED interface
- multiple properties and types per field can be created, but draws its data on the mines themselves from those in the ships.tbl
- additional player command "self destruct" to trigger single mine or mine wing detonation.