Author Topic: How to make capital ships roll?  (Read 1817 times)

0 Members and 1 Guest are viewing this topic.

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
How to make capital ships roll?
How to make capital ships roll?

That is how to make them roll after mission has started. Like for Mentu to get turrets to point at the target or with Deimos an order to roll 180 would be great when all right or left side weapons have been destroyed. If that can be done with sexps i would be happy if some one could aid.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline aldo_14

  • Gunnery Control
  • 213
How to make capital ships roll?
I'm not sure if it is possible.  There may have been an SEXP added for it, I don't know offhand.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
How to make capital ships roll?
Can't be done easily at all. It is possible to do this using a repeating event, variables and the Set-ship-facing event that the SCP added. I certainly wouldn't want to do it very often though.

You'd have the set the mission up using very specifically to take advantage of that. It would have to be something specially arranged for the ship to do. You certainly couldn't do it in a

When
-Turrets on one side destroyed
-Roll onto the other side

fashion for every ship in your campaign.

Anyway :welcome:
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline pyro-manic

  • Flambé
  • 210
How to make capital ships roll?
It's a feature that would be very useful, I have to say. Pester the SCP bods about it. ;)

The best way to do it would be to set up a pair of waypoints several km distant from the area of the battle. Have the ship initially face one of them, then have an event which tells it to fly to the other one when certain turrets are destroyed. It should turn pretty much on it's axis to face the other waypoint before it moves off. Then use an "is-ship-facing" (or the sexp that deos this, whatever it's called) to stop it moving again. Clumsy, and it might end up at an odd angle, but it might do the job. Experiment a bit, that's the best way... :nod:
Any fool can pull a trigger...

 
How to make capital ships roll?
dont AI fighters turn though? ahem.... fighter tag entry maybe? i noticed the cain does a turn when it gets shot by a BFg beam... and spins down.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
How to make capital ships roll?
The problem is that besides waypoints, you can't do any fine control over movements for any objects in FS.  SExps such as the following would be useful:

ai-face-object

1st argument is the face on the subject ship that to face the designated object
2nd argument is the object that the subject ship is to face
3rd argument is whether or not the subject ship should track the object

In use:

When
-true
-add-goal
--GTC Orff
--ai-face-object
---bow
---SC Taranis
---1

Now, the Orff will point its nose towards the Taranis and if the Taranis moves more towards the Orff's starboard side, it will contine to rotate to keep its nose pointed to the Taranis (as best as it can, as rotation rates of larger vessels will slow their movement).  Now, if the ship being ordered to maneuver is something more like an Orion class (beam-equipped), you'll want it to point its flanks towards its enemy, so make argument 1 "port" or "starboard".  Leaving argument 3 as "0" will tell it not to track the designated object, but tracking could be simulated using "every-time" in place of "when", then using a form of this sexp without any tracking and having the event continue as long as certain mission conditions are met, or are incomplete.

Also somewhat less useful, would be ai-face-location, which would use co-ordinates to order the ship to face, but that can be accomplised by using a waypoint, then during the test phase of a mission, check to see how long it takes the ship to aim at the waypoint, then clear orders.
The Trivial Psychic Strikes Again!

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
How to make capital ships roll?
You can currently fake that if you know where both ships will be but it would be much easier (and much more logical) for the game engine to handle this.

The problem is that this has been requested several times and from what I understand it requires some serious work with the AI for this to work. And we all know how scared everyone is of the AI code :p (Rightfully so from what I hear :) )
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline NGTM-1R

  • I reject your reality and substitute my own
  • 213
  • Syndral Active. 0410.
How to make capital ships roll?
Somebody's got to do something with the AI sooner or later...it's getting to be the main bottleneck in mission design.
"Load sabot. Target Zaku, direct front!"

A Feddie Story

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
How to make capital ships roll?
I'm sure that eventually someone will roll up their sleeves and wrestle the AI code into something more managable just like Goober did with multiple docking.

 Thing is that it won't be an enjoyable task so I'm hardly surprised no one has tried it yet.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
How to make capital ships roll?
AI is actually more sensitive than multiple ship docking though, so it will be interesting to see how this gets pulled off.  Multi-ship docking won't actually affect anything that doesn't take advantage of it, whereas changes to the AI, even basic ones like telling them to fire trebuchet missiles, can FUBAR existing missions quite royally.  Things are moving more and more towards a "use new AI" flag in FRED being needed (maybe on by default in FRED, but required to get new behavior in missions) that allows old AI and new AI to coexist within the engine.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline Dark RevenantX

  • 29
  • anonymity —> animosity
How to make capital ships roll?
The cain turning from the BFRed is because it is being pushed.

Would a fenris just stand still if a couple BReds hit it straight-on?

 

Offline KappaWing

  • Lost in the nebula
  • 28
  • 1000101
How to make capital ships roll?
I think the ship's movements when it gets hit with a weapon depends on;
1) The ship's mass. (Defines How much it rolls)
2) The center of mass. (Defines The axis it rolls on)

I think these are in the .pof file. You can view this info in Modelview's POF editor. If you edit the .pof files, you can alter the ship's mass and make it roll more or less when it is struck by a weapon.

BTW, A capship-roll SEXP would be EXTREMELY useful, as I wanted to do this several times, but didn't know how. The arguments could be;
1) Name of ship
2) Nubmer {In degrees} that the ship should will roll.

In FRED, it would look like this;

-When

--Turret-destroyed
---(List All Starboard turrets)

--Capship-roll
---GTD Cheezmastaz
---260

So when all turrets on the Starbord side of the ship are destroyed, the GTD Cheezmastaz will roll 260 degrees clockwise, therefore, letting it's port beams rip away at the SJ Pwnage.

I don't know how hard this SEXP would be to make, but it's a suggestion :)
"Your efforts to interdict me have failed, papacy. Pentagon, engage propaganda drive."
"Now, Protestant scum, you will see the power of this fully armed and operational Papal Station!"

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
How to make capital ships roll?
To make your sexp more flexible, perhaps something more like this:

AI-Reorient
-< name of ship >
-axis of movement (ship's x, y, and z axes)
-number of degrees (using negative degrees will cause the roll in the opposite direction)
Additional entries up to 3 pairs (1 pair for each axis) are possible, but a minimum of one axis and one degree entry are required.

example:

FS2-era, Orion class destroyer GTD McCarthur is engaging a pair of cruisers on its starboard flank.  One is destroyed but a Moloch jumps in ahead of it.  To bring its flank batteries to bear on the new target, the McCarthur must rotate about 80 to 90 degreed to port.  Now, degrees would be measured starting clockwise, so 80 degrees to port would be 290 degrees.  If you told the ship to rotate 290 degrees on its Y axis, it'd spin all the way around 290 degrees clockwise, but if you told it to rotate -80 degrees down the Y axis, it'd rotate 80 degrees counter-clockwise.  The following event is used:

when
-has-arrived-delay
--SCv MOFO
--5
-AI-Reorient
--GTD McCarthur
--Y
---80

Now, if the Moloch was, say 50 degrees below the McCarthur's ZX plane, you might want to have the McCarthyr also adjust its Z axis orientation so that its firing straight at the corvette.  The event would then look like this:

when
-has-arrived-delay
--SCv MOFO
--5
-AI-Reorient
--GTD McCarthur
--Y
---80
--z
--50 (that's positive, since a rotation down on the starboard side is a clockwise rotation)

How's that?
The Trivial Psychic Strikes Again!

  

Offline KappaWing

  • Lost in the nebula
  • 28
  • 1000101
How to make capital ships roll?
Sounds really good! The only thing we need now is a coder to implement it.
"Your efforts to interdict me have failed, papacy. Pentagon, engage propaganda drive."
"Now, Protestant scum, you will see the power of this fully armed and operational Papal Station!"