doomsider / DTSD

StarMade Daemon
GNU General Public License v2.0
1 stars 2 forks source link

Tutorial & Galaxy Radius #5

Open XozaShadow opened 9 years ago

XozaShadow commented 9 years ago

Had a user log in to a server I'm running and start getting teleported back to the 'galaxy edge' from 2000000000,2000000000,2000000000 something. Apparently this is where the tutorial happens. If they're that far away, I'd rather they be teleported right to core (if > radius * 2, then, core?) or some way to add an exception to the tutorial area.

doomsider commented 9 years ago

Hmmm not sure what is going on here, but Titansmasher did write a bit a code that effectively wraps the universe to your pre-set limits. You can disable this of course.

danny-may commented 9 years ago

I dont entirely understand what is happening here Do they log into the server at 2000000000,2000000000,2000000000? As it currently stands with the code, users will be teleported to the opposite side of the universe if they go too far away, kinda like sector 0,0,100 effectively leads to 0,0,-100. I guess I could add an exception where if a user is more than, say 5 sectors out of the universe border, they get teleported to the universe center. (2 sectors would be enough, because they get teleported as soon as they change sectors in theory) But, as doomsider said, this feature is configurable in the settings file. The universe size and center can be adjusted, aswell as being able to turn the feature off entirely.

XozaShadow commented 9 years ago

As far as I saw, they logged into that area, complained about being teleported sector by sector at a time, back toward 0,0,0 then logged off. I confirmed this activity in the logs.

Currently I have my center at 0,0,0 with 500 sectors radius. I've enabled this feature (I love the idea btw) to avoid having players travel into oblivion, unnecessarily, eventually spawning additional galaxies and loading the server with unlikely to be used again, data.

I'm all for exploration and expansion so I'll just increase the borders as needed.

danny-may commented 9 years ago

hmm ok, give me a few hours and ill add a fix. I wont be able to test it tho, no access to a linux system at the minute :(

danny-may commented 9 years ago

Ok, uploaded a fix now. hopefully, it will teleport anyone who is more than 2 sectors outside of the universe edge to the universe center. It is untested, so please check it works before using it on your main server :)

XozaShadow commented 9 years ago

Thanks! I'll test and confirm resolution soon. Dropped it on our server anyway and I'll keep an eye on it and test it.

I did test the tutorial for future fixes and to accommodate the idea of having the tutorial available + galaxy radius. It looks like when you do the new player tutorial, it takes you to the 'tutorial location' where there's an NPC you talk to (I've not done it in years, this is kinda new to me now). This location is random in the billion sectors. Likely utilizing a temporary 'sandbox sector' the server.cfg has an option of turning on (haven't used)?

If you do the tutorial on a server that does have a radius limit, to get out of it (because you can't talk to the NPC if you get teleported back to center) you can, End the tutorial then press Next. If it does teleport one sector at a time, (like previously) the fastest way back obviously was suicide.

XozaShadow commented 9 years ago

./starmaded.sh: line 1770: syntax error near unexpected token '}'

Also, the lite version seems to just be some of the automated stuff, like tips and votes, but doesn't take any !commands.

danny-may commented 9 years ago

derp, missed the closing fi lol fix(?) released

XozaShadow commented 9 years ago

That's what I thought when I looked at it, but I wasn't sure X), still kinda new at this.

Looking good so far!

danny-may commented 9 years ago

Has anyone logged in outside the universe border yet? If not would you mind teleporting yourself outside of it, and see if you do get teleported back to the center?

XozaShadow commented 9 years ago

Already did and works great.