Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Dark RevenantX on February 07, 2009, 01:18:15 am
-
Yes, I've nearly got it working perfectly (except the annoying problem with flak knocking back the test aeolus slightly). However, we absolutely need a PrimaryFired and possibly a SecondaryFired (takes a ship, a primary/secondary weapon bank, and maybe a delay) SEXP in order to have decent beams working. I've managed to get the targeting, beam firing, etc working, so that capital ships can be targeted and fired upon as if the beam was a primary. Blob turrets and anti-fighter beams are a completely different story, however, and would require much more than just 1 SEXP to do with any kind of sane speed (1 event must be added per targetable ship). The problem with key-pressed is that you can push the key however many times you want, but the primary dummy weapon will only fire for however much energy you have (50% energy is drained with each beam firing, so you can drain your engines (the aeolus is given afterburners, too) in order to increase beam output). The result is that you will be getting free beams...
Why all of this? Currently, player-fireable beams can only shoot straight forward. For a better capitalship style play, they need to be able to fire on targets like true turrets would, meaning broadsides would be more effective.
Optional SEXPs:
1. GetTargetedShip (to be used as a data field; this would make it possible to use anti-fighter beams and it would be a ****load easier to FRED in general)
2. GetLoadedPrimary / GetLoadedSecondary (checking the primary/secondary type would allow for swappable beam types in the loadout selection screen. There is simply no way to check which weapon is installed as it is...)
-
Yes, I've nearly got it working perfectly (except the annoying problem with flak knocking back the test aeolus slightly). However, we absolutely need a PrimaryFired and possibly a SecondaryFired (takes a ship, a primary/secondary weapon TYPE, and maybe a delay) SEXP in order to have decent beams working. I've managed to get the targeting, beam firing, etc working, so that capital ships can be targeted and fired upon as if the beam was a primary. Blob turrets and anti-fighter beams are a completely different story, however, and would require much more than just 1 SEXP to do with any kind of sane speed (1 event must be added per targetable ship). The problem with key-pressed is that you can push the key however many times you want, but the primary dummy weapon will only fire for however much energy you have (50% energy is drained with each beam firing, so you can drain your engines (the aeolus is given afterburners, too) in order to increase beam output). The result is that you will be getting free beams...
Another cool thing about a PrimaryFired SEXP is that if it checked by primary/secondary type rather than bank, it would be very easy to allow for swappable beam types in the loadout selection screen. There is simply no way to check which primary is installed as it is...
Why all of this? Currently, player-fireable beams can only shoot straight forward. For a better capitalship style play, they need to be able to fire on targets like true turrets would, meaning broadsides would be more effective.
Optional SEXP:
1. GetTargetedShip (to be used as a data field; this would make it possible to use anti-fighter beams and it would be a ****load easier to FRED in general)
Wow that is awesome! But I imagine it would take years to sexp.
-
He says he's nearly got it working. I trust him.
As for flak/AAA/blob turrets, they're mainly defensive weapons. Can you just leave them on auto-targeting, like bomber turrets work now?
-
Keep in mind that AAA turrets can be used to selectively destroy fighters and attack capital ships...
Edit: Crap, is there any way to detect if BOTH primaries are selected at the same time?
(http://comclan.co.cc/xsera/Cap1.jpg)
(http://comclan.co.cc/xsera/Cap2.jpg)
(http://comclan.co.cc/xsera/Cap3.jpg)
(http://comclan.co.cc/xsera/Cap4.jpg)
(http://comclan.co.cc/xsera/Cap5.jpg)
-
:jaw:
-
2 things:
1: WOW. :jaw:
2: How do WE set it up so us humble end-users can try it?
-
Well, it's not really much at the moment because beam firing is so exploitable right now. I'd have to have a PrimaryIsFired / SecondaryIsFired (takes a ship and a bank, possibly a delay) to make it fully-functioning.
-
Well you might as well think ahead and if requesting such a sexp make it just and is-fired. Then you could make the type one of the arguments and it could be primary, secondary, turret, counter measure, or anything else added later on. That way it's not only useful for the caps but for regular ships as well.
-
It's really up to the programmer tbh. The coders know more about the engine than I do...
Anyway, if the three SEXP's are created, I can/will make a campaign out of this.
SEXPs preferred:
IsFired (takes a ship, a weapon category (as said in the above post), and weapon bank/turret/whatever, returns true/false)
GetLoadedWeapon (takes a ship, a weapon category (primary or secondary), and a weapon bank, returns a weapon type)
GetTarget (takes a player ship, returns its current target)
For the prototype: Extract to your FreeSpace 2 directory.
Edit: this prototype is of course out of date and has some bugs other than the obvious ones I've posted
[attachment deleted by admin]
-
I'm still a little confused about what you want from this is-fired SEXP. From what you describe it sounds like it's a "has this weapon ever been fired" SEXP. I've not played with the weapon code much but if you want a SEXP that says "Has the weapon fired in the last x seconds" that should be possible.
Similarly I could probably make a get-loaded-weapon SEXP but all I can return is a string. It will be up to you to figure out what to compare it to as none of the other SEXPs can deal with a weapon type.
As for get-target, you can do that with the current targetted sexp and when-argument. Not certain how hard a SEXP would be. Probably not very.
-
Targeted is not very good for this because I have to make a separate event for each and every targetable ship. This makes large missions tedious and fighter targeting impossible. A get-target SEXP would let me completely drop the target events altogether and have a much more streamlined and versatile code overall. And meaningful AAA beam usage would be possible. I'd be able to use it directly in the weapon-fire SEXP's without having to use a variable (meaning this would also allow multiplayer support).
It's fine if get-loaded-weapon returns a string. Actually, a string is the only way it would logically work for my purposes.
is-fired would basically check if a weapon has been fired in the last instant or other reasonably short measure of time, if needed. 0.5 seconds would be fine for my purposes, but a 0.05 second check would be more versatile. Keep in mind that this SEXP would be used in an every-time conditional.
-
The stories of mere fighter pilots beoming fleet admirals will arise. ;7
-
Targeted is not very good for this because I have to make a separate event for each and every targetable ship.
Even with when-argument? Admittedly it's a clumsy way of doing it but it's certainly easier than making an event for each ship.
I'd be able to use it directly in the weapon-fire SEXP's without having to use a variable (meaning this would also allow multiplayer support).
Somewhat confused again. What's the problem with variables?
is-fired would basically check if a weapon has been fired in the last instant or other reasonably short measure of time, if needed. 0.5 seconds would be fine for my purposes, but a 0.05 second check would be more versatile. Keep in mind that this SEXP would be used in an every-time conditional.
The only way I'd make this SEXP is if I added a delay argument (probably in ms rather than s) so that the FREDder can determine the length of time they need themselves. Bear in mind I'm still not certain it's possible. I'd have to look into how the fire wait code works.
-
Even with an every-time-argument event, fighters would still be extremely difficult to make work because not only would I have to specify each and every single fighter craft, I would also have to specify all of their reinforcements as well. This basically makes it an unbelievably tedious and time consuming process for large missions, especially since the final mission in my campaign will essentially be a BOE. (I can get away with it because you will be using a destroyer and will be able to order around 15 or so other capital ships).
Also, there's no problem with variables. It's just that there is currently no way for a SEXP to figure out which primary/secondary is loaded. I need one so that the game can swap out the turret weapons on your ship based on which primaries have been selected for the mission.
Edit: Anyone know a way to get rid of the red screen flash upon being hit?
-
Strange I was just talking about such a bit list in the FRED forum. I know what you mean about specifying every single ship. I've done it and it's not fun. Well the second wing isn't too bad but that first one is a killer.
-
Forgive me if this is a stupid question, but say if you equipped your wingman
with similar cap ship abilities, would this not be similar to a small flotilla command?
(IE question being would it work?)
-
Well, AI wingmen would just use beams like they normally would.
-
Remember that linked fire code someone came up with a while back. Could you imagine you and your AI caps linked like that?
-
Well I tried the mod so far, and I'm sorry to say it wasn't that awesome. This really seems like the sort of thing that could be more easily done through scripting, but then again, you did mention multiplayer, and I know scripting and multiplayer do not get along all that well.
-
Of course, it's hardly awesome to do something as simple as rushing a Moloch head-to-head. It's mainly a tech demo. More complicated missions and a true challenge where your input actually does affect the outcome considerably is certainly a lot more entertaining.
-
Well i know nothing about coding, but just a thought. Assuming that you put most of the minor turrets under AI control, Is there a way for you to give it commands as you would give wingmen commands? For ex. To target bombers first, you would press C to bring up command list, 1 for ships, 1 for your own, and 2 to focus attack on bombers?
-
Well i know nothing about coding, but just a thought. Is there a way for you to give it commands as you would give wingmen commands? For ex. To target bombers first, you would press C to bring up command list, 1 for ships, 1 for your own, and 2 to focus attack on bombers?
You could probably sexp that in, target priority etc etc. Adding it to the comms menu would probably be pushing it though.
-
Not that I want to rush anyone, but when would the 3 SEXP's I explained be available for use? Eventually, I'm going to get to the capship portions of my campaign and will need them to continue work.
-
Not that I want to rush anyone, but when would the 3 SEXP's I explained be available for use? Eventually, I'm going to get to the capship portions of my campaign and will need them to continue work.
Depends on how much time coders etc have, and how much potential people see in this.
-
Well, it's worth a shot after years of random people asking for actual capship missions.
-
Awesome. Pretty cool to see this in action. I just don't get the instructions: Up arrow doesn't have any function. Just trying to figure out how to see the beams in action without crashing it.
-
Crashing it? You have to have all of the data files in the right directory...
Anyway, the campaign will be in a vp, so it's not really a problem once that gets released.
-
No idea what was wrong. Got it working now. How do I use the AAA beams, though? They seem to focus on the big ships only. Also, I'm not sure how to lock the target so the beam doesn't just cut across the hull.
-
That must be a TerSlash beam or the like, it's just how it works.
-
A major engine modification would be required for manual turret aiming. Sorry, Nemesis6. The best that can be done right now is commands to each turret to fire on a ship or, possibly, a general direction.
The bug with AAA beams is known and I have subsequently fixed it (sort of). I won't bother releasing a new test mission, though, until a new SEXP (or three) is implemented.
-
I'd very much like to see this mature more if for nothing else but the sake of having it available to use.
However, I don't feel entirely right though trying to add our support when my mod is still a long ways
off before we could actually make any use of it.
-
Actually I'm probably going to take a look at these SEXPs after I'm done with the ones I'm making for you. :)
-
Yay! ;) :nod:
-
Bump.
Any updates on progress or are you just bugfixing?
-
Still bugfixing for the most part.
-
I hope that ''still'' won't stay for TOO long.
-
Hello, I got here to help but as of now I haven't seen any code, so I can only make proposals.
Regarding the firing of a weapon, it can be done by emulating recharging based on the level of current engine energy level. If there is not enough energy, it just won't fire not matter how many times the buttons are hit. Since the energy level variable already exist this shouldn't be much of a problem, just need a new method.
Getloaded weapon can be done likewise by checking levels, but to prevent a lower level weapon to fire all the time a variable would be needed to simulate colling time. So it will make way for other weapons to be used.
Actually, using 'charging' the fired and getloaded can be merged to one
As to getting target information, this seems contradicting. For one you want the information, but it can only be true if a target was assigned either by the some AI chosing or by the player through a command/event. Without any assignment the answer could be anything the returned parameter has.
-
Almael is looking to possibly start a new FS2 mod depending if he can accomplish his goals
with the FS2 SCP engine... he's got a background with some coding, translation, and scripting
concerning games. We're both members on another forum.
So just to point out he's not a fly by night first time poster.