Binary System Stargates

Post about your finished mods here.
Post Reply
relanat
Militia Captain
Militia Captain
Posts: 789
Joined: Tue Nov 05, 2013 9:56 am

Fri Jul 26, 2019 2:11 am

Binary System Stargates

A mod which add two small stargates to binary systems. These jump the player to the other end of the system saving all that travel time.
Requires 1.8 or higher. SOTP and EP.

http://xelerus.de/index.php?s=mod&id=1620
Stupid code. Do what I want, not what I typed in!

User avatar
AssumedPseudonym
Fleet Officer
Fleet Officer
Posts: 1099
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

Fri Jul 26, 2019 10:19 am

 I’d been meaning to experiment with that for years, now.

 Two quick things. First, is random traffic able to use these gates in the same manner as the player? Second, Wolfy and I have both created close binary systems where the overall system size is roughly the same as a normal system; you may want to add a check on the stars to make sure they’re at least a certain distance apart. …I’d also suggest changing the check on star count to >1 instead of =2 in case someone gets cute and makes a trinary or quaternary system, but then you get multiple minigates around each star, and two stars might be only a light-minute or so apart, and basically it just all gets really messy in a hurry…
Image

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)

My mods on Xelerus: Click here!

Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)

Tiber
Militia Lieutenant
Militia Lieutenant
Posts: 123
Joined: Tue Dec 18, 2018 4:12 pm

Fri Aug 02, 2019 7:10 pm

AssumedPseudonym wrote:
Fri Jul 26, 2019 10:19 am


…I’d also suggest changing the check on star count to >1 instead of =2 in case someone gets cute and makes a trinary or quaternary system, but then you get multiple minigates around each star, and two stars might be only a light-minute or so apart, and basically it just all gets really messy in a hurry…
no need,
u can limit the ''express'' gates to 1 combo, making it so that that incoming gate onley has a duplicate to the end gate of the star cluster.
This allows for any number of stars, while still having a bypass gate.

NMS
Militia Captain
Militia Captain
Posts: 537
Joined: Tue Mar 05, 2013 8:26 am

Sat Aug 03, 2019 10:03 am

It wouldn't be too difficult to create a pair of gates for each pair of stars that are more than some distance apart. Edit: Actually, I guess you'd want to ignore all but one star in any cluster. That's a little more complicated, but still doable.

I would guess for AI ships the game treats these the same as gates leading to other systems. I.e. new traffic and reinforcements can come out of them and ships ordered to gate can enter them and disappear. But correct me if I'm wrong. I think you could use events to ascend any ship that enters one and immediately descend it at the corresponding gate, but you'd have to give it different orders or it would just gate back and forth. I can't think of any way to make the AI deliberately use them as shortcuts (without engine changes). It might be better to prevent the AI from using them at all, if that's possible.

relanat
Militia Captain
Militia Captain
Posts: 789
Joined: Tue Nov 05, 2013 9:56 am

Tue Aug 06, 2019 3:43 am

I’d been meaning to experiment with that for years, now.
And that's how long it took me! (er... well... more accurately, me with a heap of code help from NMS!)

Random traffic won't use the minigates (great name, thanks, I'm stealing that! :D ). Although I added the 'stargate attribute to them for possible future compatibility with Commander's Log, they don't fall under the 'G' criteria for objects which is what the traffic uses. But it would be great if traffic did use them. I don't think it would need much change to the traffic code. Just a criteria change and an event or two maybe. They could jump to the other end of the system if another station was the destination or we could destroy them at the gate if they were meant to gate out. Possibly a bit more difficult to create them at one of these minigates though.

@AP, great idea about checking the star distances. Would 1000 ls cover it? The smallest distance in standard game binary systems is Sirius at 1500 ls. All others are over 2000. Renegade has a close binary system but it doesn't trigger the code because the second custom star doesn't have the 'star' attribute.

And yes, I did consider adding the ability to handle more than two stars but quickly realized how complex that would be so I did the only appropriate thing... I ran away screaming and hid under the stairs for two days! :lol: The terror has subsided now. Good suggestion by Tiber. The minigates could jump sequentially to each star, starting at the star near the incoming gate. At the last star that minigate could jump back to the first one. If the system stargates were at different stars the last jump could be to the star with the outbound stargate.

The jump between the minigates is fairly abrupt though. And the surroundings can often look very similar at both ends of the jump. I would like to add an effect or delay or something which indicates that the ship has moved a great distance but don't have any good ideas about how to do it. Anyone got any thoughts on how to do that?
Stupid code. Do what I want, not what I typed in!

Tiber
Militia Lieutenant
Militia Lieutenant
Posts: 123
Joined: Tue Dec 18, 2018 4:12 pm

Mon Aug 26, 2019 12:14 am

relanat wrote:
Tue Aug 06, 2019 3:43 am
I would like to add an effect or delay or something which indicates that the ship has moved a great distance but don't have any good ideas about how to do it. Anyone got any thoughts on how to do that?
That should be no problem.
For the animation u can use the old Purple jump screen as a smaller version in a round circle.
Than u make these minigates have a weapon, whit thier turret radius the same or larger than themselves.
This weapon, does no damage but does target the other gate it is pointed at., and ofc ''shoots'' its animation in the direction your travelling. ( need omni weapon for that)
As to add a delay, the delay of the ''gateweapon''animation would be more than enough i suppose, in fact care not to make it to long i recon.

All the above allows for a single gate set, or any number of gates since the ''gate omni weapon'' can point and shoot in any direction.

At the gate ur travelling to: u can use the ''decloak'' effect from stealth armor on the player ship ( and whatever travels whit u ).

Anyway, most of the code above should be already ingame, and most u could probably copyPaste.
Actually, ignore that last sentence, i have no idea how to code ;-p
The resources are available i imagine ;-)

relanat
Militia Captain
Militia Captain
Posts: 789
Joined: Tue Nov 05, 2013 9:56 am

Mon Aug 26, 2019 3:40 am

Thanks, Tiber, great ideas.

Have the ship or effect seem to shoot towards the other gate.
Set the POV or use cloaking so the playership vanishes for a while then appears by uncloaking. Or maybe in a cloud of effect. Or something.
Possibly use the EP 'freeze the ship at game start' feature to lock the player out from moving.

Excellent. Thanks.

I have a slight idea about code but am MUCH better at copy and paste! :lol:
Stupid code. Do what I want, not what I typed in!

Post Reply