Povstalec / StargateJourney-ComputerCraft-Programs

CC: Tweaked Programs for StargateJourney
4 stars 5 forks source link

ComputerCraft Program seems not to work with Atlantis Gates #3

Open Melris87 opened 2 months ago

Melris87 commented 2 months ago

hello there, I am playing with the mod in the ATM9 modpack. The Mod itself is version 0.6.22 and the CC Programs works fine until I try to use it with the Atlantis Gate. I use the StargateDialing.lua since this works fine for me, but I get an error in line 33 "attempt to call field 'rotateAntiClockwise' (a nil value)" is there another function for the rotation of a Atlantis Gate or am I missing something?

best regards and thank you for your amazing code Melris

Povstalec commented 2 months ago

I'm not sure you're using StargateDialing.lua, or at least not exactly in the form it has on Github, since in it, all instances of functions that rotate the Stargate have been commented out, so if that was the case in the code you're running, no such error would be possible. So it might be worth checking if you've accidentally copied something else or uncommented functions that should have been left commented out.

Instead of using functions for rotation, Pegasus (Atlantis) Stargates need to have symbols engaged directly(note that you need at least a Crystal Interface to properly interface with Pegasus Stargates. The function used is engageSymbol(int symbol)

You can either try A) rewriting the code yourself by deleting the contents of the for loop and replacing them with interface.engageSymbol(symbol) or B) copying the current code from StargateDialing.lua as that one is actually guaranteed to work with the Pegasus Stargate (unless I changed some internal Stargate interfacing code again, which I do not recall doing since the last time I edited the dialing program code on github).

Melris87 commented 2 months ago

hello there now it is working, seems like the copying missed something I dunno ^^" but beside my base-address I can't dial Abydos or Chulak, tells it is an invalid address, do I need to change the PoO when I dial from Lantea?

but so far it works as intended, only thing the sleep time but they can be adjusted ^^

Povstalec commented 2 months ago

I'm not completely sure, but I'm guessing that since you're dialing from Lantea, you're not using the 8-chevron addresses.

Basically, a 7-chevron address will only work if the target Solar System is in the same galaxy. Lantea is in the Pegasus galaxy, while both Abydos and Chulak are in the Milky Way galaxy. The only way to dial them from Lantea would be through an 8-chevron or a 9-chevron address.

I'm also assuming your base-address is the 9-chevron address of your Stargate, which isn't affected by galactic networks at all and that's why it works.

You should be able to fix your problem by just using the 8-chevron (extragalactic) addresses of Abydos and Chulak. Here you can look at all the default addresses currently in the mod: https://github.com/Povstalec/StargateJourney/wiki/Solar-System

thesweetiger commented 2 months ago

the lantea adress miss a zero at the end , just add ,0 at the end of the leantea adress fix it

also this code is for calling from Milky way galaxy , you need to rewrite all the adress if you call from another galaxy with 8 chevron instead of 7