Jump to content

[MOD] /wormhole


Cypher

Recommended Posts

This mod adds a /wormhole command to your game.

 

To use:

Use /wormhole or /wh followed by: "info" to get a console printout of the WormHoles in the current sector

Use /wormhole or /wh followed by: "create x y" to create a WormHole to sector x,y

 

To use this on a server the server needs to have the mod installed.

 

There are 2 settings which can be changed:

WormHole lifetime - Controls how long a WormHole remains alive

Admin permission - If the command can only be used by admins

 

The settings can be found in: .../Avorion/data/scripts/player/cmd/wormhole.lua

 

If you do come across bugs please take the time to let me know

Furthermore if you have any suggestions or ideas feel free to share them. Also if it might be an idea for a different mod ;)

 

Enjoy!

 

Installation

 

To install:

Copy the data folder in WormHole to the Avorion install folder. This is usually located in your steam installation folder under: .../Steam/SteamApps/common/Avorion

 

To uninstall: manually remove the wormhole.lua & wh.lua in .../Steam/SteamApps/common/Avorion/data/scripts/commands

and wormhole.lua in .../Steam/SteamApps/common/Avorion/data/scripts/player/cmd

 

 

 

Planned features:

  • Setting for center ring protection so players cannot warp to the center instantly
  • Setting for max distance between current and target sector
  • An immersive implementation meaning that it will have configurable settings for items needed
        and/or a price to be paid once or depending on distance to open a WormHole for non-admin players
  • A nice UI to complement the mod :)

WormHole.zip

Link to comment
Share on other sites

Hello.

 

Nice stuff! I see great potential into this. Mainly, if this function could be tied to a block it would bring a Homeworld Mothership style of transportation. In Homeworld, the mothership have the hyperdrive, smaller ship do not. Your mod could emulate something similar to this.

 

Thanks

Link to comment
Share on other sites

interesting mod.

I have a question for you, what would be the proper way to do the same thing, but with it being a random exit location and I was trying to have it so if I have a system equipped on my ship there would be a dialog for it and choosing option, it will spawn the wormhole.

Much appreciated

-LS

Link to comment
Share on other sites

I have looked into this and i have not find a way yet to remove it by code. It does however tend to update after a while, have not found the exact situation yet on when it does, could be that visiting the 2 sectors by jumping instead of warping might remove it

Link to comment
Share on other sites

  • 4 weeks later...

fGAyYK2BjjBLGa6ran3mx8BV1IJfLqMeq17k-Efzun8?size=2048x1536&size_mode=3

 

Getting error

 

could not execute function 'showWormHoleinfo' in "data/scripts/player/cmd/wormhole.lua":data/scripts/player/cmd/wormhole.lua:5: attempt to index field 'k' (a nil value)
stack traceback:
          data/scripts/player/cmd/wormhole.lua:5: in function 'updateData'
          data/scripts/player/cmd/wormhole.lua:5  in function <data/scripts/player/cmd/wormhole.lua:5>
Setting script "data/scripts/player/cmd/wormhole.lua to invalid.

 

I did actually get it to work 3 times before the error

Link to comment
Share on other sites

  • 5 months later...

you really had to go and obfuscate the code. really?

 

well I was planning on going in and making this into a ship function because an admin command for this is WAY overpowered.

But you've stopped me dead in my tracks.

 

Must be some impressive lua code bro lmao. To protect it from the eyes of a community that has yet to even truly be born.

I might just work with it obfuscated and post the results here anyway.

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...