Jump to content

[MOD]Player Warp Gates


LogicSocket

Recommended Posts

I wanted a good way to have the player ability to own/create player warp gates.

 

This is especially useful if you are "owning" your own sectors and want gates to other sectors.

 

I have set this as a command from chat, but it will cost 1 million for each gate, so it isn't so "cheaty".

 

It is op since you can set the exit to literally anywhere, (make sure this is a sector that exists or you'll have problems.

 

You CAN have multiple gates in one sector, but be aware that there is no label to where they go.

 

How to use:

open map and find coordinates of where you want the gate to exit TO. write down the x/y coordinates.

Let's say you want to go to X:63 Y -326 you will type this:

/gate create 63 -326 and press enter. Poof. as long as you have the required 1 million credits your new player warp gate will appear.

the exit when you go through the gate is a wormhole, because i wasn't sure how to actually reference the exit.

 

mmq6f4.jpg

 

Mod Download:

https://mega.nz/#!wIERGTYT!rSc66G32COnrvEUHYv3xqAy30aO5Ning5Ao3-TQrbQI

 

Credits: Aki for his Avorion Commands Package as I used one as a base for the command aspect.

Required: Aki's Commands Package:

http://www.avorion.net/forum/index.php/topic,830.0.html

 

Link to comment
Share on other sites

Tested on regular and beta versions. Both normal and creative... it didn't work.... I even pasted the command from your post and even changed the numbers to match a sector right next to me with no avail.

Link to comment
Share on other sites

Hi cel367

sorry it isn't working for you can you install aki's command mod and see if that fixes it?

http://www.avorion.net/forum/index.php/topic,830.0.html

 

only thing I can think of as it works perfectly on my end.

it would be like: /gate create 63 -326

no commas etc. please let me know everyone if this mod is not working or if it is thank you.

 

Link to comment
Share on other sites

Thank you! I didn't have the command mod installed. Appreciate the help, and a suggestion. It would be awesome if you put the requirements and a link to the command mod in your main post. That way you will not have to worry about other people asking the same exact thing. Cheers!

Link to comment
Share on other sites

I love the idea of this mod, though frankly i haven't actually used it yet. Sounds amazing and also amazingly op, though I do have a few suggestions to make it less OP.

 

-1 million credits is very easy to come by within 2 hours or so of trading, so 1 million credits is actually fairly cheap. I would suggest using a scaling price based on the distance covered by the warp. Maybe set the base price to be 500k and then multiply the distance covered by the gate by 100k and add that to the base price. this way if you warp roughly 5 sectors, its 1mil, if you warp 50 sectors, its 5.5mil. Makes a little more sense for it to scale than just be a flat fee.

 

-restrict players from creating rifts into the center of the galaxy to skip the rift barrier (just check that the endpoint is greater than ~150 sectors from the core (maybe give an extra 3-5 sectors just to avoid conflicts with the barrier in all cases)

 

-give the above restriction is implemented, allow for players to create a rift to the center if they are already within 150 distance to the center, or check to see if they have any avorion "ore" in their resource inventory, since they wouldve needed to be within the center anyway to get that. (or are just cheating and dont care)

 

 

I havent done any coding in quite awhile, nor know much lua, but most of these are just easy catches for distances and shouldnt be too hard to implement.

Link to comment
Share on other sites

This sound awesome and i can't wait to try it out. I want to build a huge trade and manufacturing empire and mods like this and "Out of sector production" are essential. I would agree that 1 million credits might be a little on the cheap side 50 or 100 million might even be more realistic(traders usually end up with money to burn).  But either way thanks for the nice mod

 

Link to comment
Share on other sites

yo so idk why its not working but the warp gates dont work on my home comp but my laptop with the same mods installed works .-. did i forget to do something lol? i have the commands mod. it actually makes it so i cant use ANY gates at all 0.o

 

 

 

update: found out that for some reason the mod sector scan was causing the trouble. uninstalled everything and reinstalled every mod besides that one and this mod + regular gates work now.

 

another update: apparently not .-. they were working for awhile and now they just dont work anymore. im so confused

 

yet another update: so it only works with small ships i havent found the exactly weight or size they stop working but big ships refuse to go through any gates but small ships work perfectly fine. any idea?

Link to comment
Share on other sites

I wanted a good way to have the player ability to own/create player warp gates.

 

This is especially useful if you are "owning" your own sectors and want gates to other sectors.

 

I have set this as a command from chat, but it will cost 1 million for each gate, so it isn't so "cheaty".

 

It is op since you can set the exit to literally anywhere, (make sure this is a sector that exists or you'll have problems.

 

You CAN have multiple gates in one sector, but be aware that there is no label to where they go.

 

How to use:

open map and find coordinates of where you want the gate to exit TO. write down the x/y coordinates.

Let's say you want to go to X:63 Y -326 you will type this:

/gate create 63 -326 and press enter. Poof. as long as you have the required 1 million credits your new player warp gate will appear.

the exit when you go through the gate is a wormhole, because i wasn't sure how to actually reference the exit.

 

mmq6f4.jpg

 

Mod Download:

https://mega.nz/#!wIERGTYT!rSc66G32COnrvEUHYv3xqAy30aO5Ning5Ao3-TQrbQI

 

Credits: Aki for his Avorion Commands Package as I used one as a base for the command aspect.

Required: Aki's Commands Package:

http://www.avorion.net/forum/index.php/topic,830.0.html

 

I downloaded the files and put them in their corrosponding folders. When i attempt the gate command it recognizes it, takes my million credits, then does absolutly nothing. Is this me putting something in the wrong spot or am i doing the command wrong? I do put in thhe commands just like you do.

Link to comment
Share on other sites

Hi,

1. is there a change that Trader passing the selfmade gates ???

 

2. /gate create xxx xxx at the moment only a ADMIN can create gates,and Players can not create gates.

 

Admin.xml

 

 

<?xml version="1.0" encoding="utf-8"?>

<Administration>

<administration>

<defaultAuthorizationGroup>

<commands>

<command name="gate create"/>

<command name="help"/>

<command name="players"/>

<command name="sethome"/>

<command name="suicide"/>

<command name="version"/>

<command name="w"/>

<command name="whisper"/>

</commands>

</defaultAuthorizationGroup>

<authorizationGroups>

<group name="Moderators">

<commands>

<command name="ban"/>

<command name="banip"/>

<command name="blacklist"/>

<command name="echo"/>

<command name="give"/>

<command name="groups"/>

<command name="kick"/>

<command name="like"/>

<command name="playerinfo"/>

<command name="run"/>

<command name="save"/>

<command name="seed"/>

<command name="status"/>

<command name="teleport"/>

<command name="unban"/>

<command name="unbanip"/>

<command name="whitelist"/>

</commands>

<users/>

</group>

</authorizationGroups>

<administrators>

<admin name="admin" id="76xxxxxxxxxx24"/>

</administrators>

</administration>

</Administration>

 

 

Link to comment
Share on other sites

I have been afraid to try it but since the gates are ships what happens if you give it a crew and engines? Will it move and if it does will it still function?. Can i give it gunners and place turrets on it? Could you make a version that creates a wormhole on both ends so i don't keep starting out in the gate when i load in. Absolutely no complaints just curious, still a great mod and thank you for creating it.

Link to comment
Share on other sites

  • 1 year later...
  • 2 weeks later...
  • 4 weeks later...

Sorry to bump an old thread, but I thought i'd have a go at fixing it up a little.

 

So i made it work in one direction, then when i spawned too many gates i realised the gates can travel through each other. So currently it just spawns two gates, one goes to original sector, one goes to destination, and the one that points to original sector travels through the other, thus you have a working gate system.

 

I can upload the edited files if anyone cares

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Sorry to bump an old thread, but I thought i'd have a go at fixing it up a little.

 

So i made it work in one direction, then when i spawned too many gates i realised the gates can travel through each other. So currently it just spawns two gates, one goes to original sector, one goes to destination, and the one that points to original sector travels through the other, thus you have a working gate system.

 

I can upload the edited files if anyone cares

 

 

I'd like an updated file please.... It would help my economy vastly...

Link to comment
Share on other sites

Sorry to bump an old thread, but I thought i'd have a go at fixing it up a little.

 

So i made it work in one direction, then when i spawned too many gates i realised the gates can travel through each other. So currently it just spawns two gates, one goes to original sector, one goes to destination, and the one that points to original sector travels through the other, thus you have a working gate system.

 

I can upload the edited files if anyone cares

 

Please... I'd really really like warp gates.

 

Link to comment
Share on other sites

  • 2 months later...

Since the mod doesn't work anymore I've tried to get it to work again in the last two days.

 

And believe it or not, I've found a way to spawn the gates even with the script attached (couldn't test the pass-through price so far because as owner it's 0 for me)

 

There are only 2 problems left:

 

1.

Had to change the file "data/scripts/commands/gate.lua" because somehow I couldn't add the script by using the command "addScriptOnce".

I've changed it to "addScript" which worked for my tests but that is bad because everytime i start my server the whole file gets executed and causes some funny trouble.

 

2.

I always get "<Gate:  > nil" in the chatbox whatever I typed in.  "..action" also produces errors which I don't understand because it's the same kind of code like in crew.lua

 

Tried:

 

/gate

/gate create

/gate create 1 1

 

These are the problematic code pieces:

 

function execute(sender, commandName, action, ...)

local player = Player()
   	player(sender):addScript("player/cmd/gate.lua")
    return 0, "", ""
end

function getDescription()
    return "Creates Warp Gates owned by the player"
end

function getHelp()
    return "Example: /gate create x y"
end

 

function initialize(help, action, ...)
local flag, msg = false, ""
player = Player()
if action == "create" then
	flag, msg = createWarpGate(...)
	player:sendChatMessage("Gate: ", 0, "Warp Gate created")
elseif action == "help" or action == nil then
	player:sendChatMessage("Gate: ", 0, help)
else
	player:sendChatMessage("Gate: ", 0, "Unknown action: "..action)
end
terminate()
end

 

I would appreciate it if someone could help me out. To have such a comfort function like "/gate create x y" is a must have for me before i'll upload the rest of the code  ;)

 

Link to comment
Share on other sites

Nevermind, found a solution and the gates are working now!

 

INSTALL:

 

1. Download the mod (https://www.avorion.net/forum/index.php/topic,5275.0.html) <- Requires Aki's Command Package (LINK BELOW)

2. Extract it to your Avorion folder (default: ../Steam/steamapps/common/Avorion/..)

3. Go Ingame and look for a sector to start the new gate from (Video Example: x: 180 y: 11)

4. While in the Sector type "/gate create x y" (Video Example: /gate create 180 11)

5. The new created gate is a ONE WAY connection, means that you will have to spawn another in the target sector.

 

Example:

First Gate: (FROM: x:180 y:11 - TO: x:180 y:12)

Second Gate: (FROM: x:180 y:12 - TO: x:180 y:11)

 

6. Congratulations! You have spawned a warp gate for you or your alliance (depending on you are inside an alliance ship or not)

7. Have fun!

 

 

NOTE:

 

I have removed the costs which LogicSocket added to prevent a player to add gates right from the start off.

Since only admins/moderators are able to spawn them I have thought that this restriction is not necessary!

 

If you want to modify this mod then please add Aki, LogicSocket and me in a Credits section.

"The company thanks!" ;D

 

Credits:

 

Aki for his Avorion Commands Package

LogicSocket for his Player Warp Gates mod

 

Required:

 

Aki's Commands Package:

http://www.avorion.net/forum/index.php/topic,830.0.html

 

German: Ich habe fertig!  8)

Link to comment
Share on other sites

  • 2 weeks later...

Nevermind, found a solution and the gates are working now!

 

Very nice!

 

I would prefer a mod that includes this feature into normal gameplay though. I stopped my efforts since Shrooblord seems to work on a very promising looking attempt https://www.avorion.net/forum/index.php/topic,4967.msg27205.html#msg27205.

 

Additionally, it would be nice if it would be required to actually maintain the gate with crew, energy and shields like stations. Unfortunately, I am not sure if it is currently possible to remove the gate (or  the Wormhole component) on destruction.

Link to comment
Share on other sites

Yeah, found his thread some days later after posting the mod.

 

At the current state it's not possible to remove the gates you've placed with the mod. But in general it should be possible to remove the placed gates because they are just entities like other stations, ships or asteroids.

Link to comment
Share on other sites

But in general it should be possible to remove the placed gates because they are just entities like other stations, ships or asteroids.

 

Well with wormholes, the only way I found to remove them was setting both, start and end wormhole to one-way first, only then entities could be deleted, otherwise they would just respawn on delete. Since setting to one-way can only be done with wormholes in your current sector, you would need to change the sector to fully remove the connection. Therefore I assume this can not be done by the gate itself onDestroyed.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...