Sign in to follow this  
Keenan

[WIP] Portals Mod

Recommended Posts

I figured I'd get this post started.


 


I'm writing a mod that works with Ago's Mod Loader that will give you the ability to configure working portals from within the game. This will be the main thread for this mod when it's released, but for now I'm looking for some ideas and feedback to use during the initial development.


 


What I have so far: 


  • A working override for the PortalQuestion code (as in, I can already hijack portal actions and hard-code working portals in the mod as it is).
  • A data encoding scheme that stores all data for the mod in existing fields on the portal itself. TL;DR: Everything is done in-game and stored in your database. All changes will be live, nothing will need a reboot/reset of the server to make work (except for a few advanced things I'll get to later)

Current feature list in design:


*This may change in development!*


  • Same-server point-to-point travel. (i.e. set an X/Y and go)
  • Cross-server travel (set an X/Y and server ID)
  • Kingdom features (Allow only XX Kingdom, Convert To XX Kingdom)
  • Set specific kingdoms or prompt from a list.
  • Epic-style "separate" player files (if possible in WU)
  • Item limits (old style portals)
  • Individual portal cool downs (still a WIP idea)
  • List of spawn points instead of X/Y
  • List of alliance spawn points (WIP idea)
  • Server Listing (instead of just setting server ID)

Advanced features will require the use of portalsmod.properties and a restart of the server to incorporate (though I might see about reloading this file in-game... I have to look into that)


  • Specify a list of villages, spawn points, etc for a specific portal to show (this will be based on the portal's WurmID)

 


These are all of the things I'm going to be working on implementing now that I have the data storage finished. 


 


Feel free to request features and I'll see what I can do. :)


  • Like 17

Share this post


Link to post
Share on other sites

Sounds great! Will there be an ability to implement some kind of cost to using the portals? I like the idea of being able to travel to different areas of my map but if it's just free then it would feel like a bit of a cheat :-)


Share this post


Link to post
Share on other sites

Can the list of places you can port to/kingdom choice happen for all player built portals automatically, and have you port back to the portal you left from (like epic).


Share this post


Link to post
Share on other sites

Hi Keenan,


 


                to start off, thanks for all the great work you are doing, I know lots of people greatly appreciate it ! :)


 


                Ok, will it be possible to make it so that if you are riding a mount and use a portal the mount will go through also ?


 


                Not a cart or wagon, just a mount that you are riding, maybe even leading, I dont know.


 


 


                Thanks :)


 


Share this post


Link to post
Share on other sites

Sounds great! Will there be an ability to implement some kind of cost to using the portals? I like the idea of being able to travel to different areas of my map but if it's just free then it would feel like a bit of a cheat :-)

 

I'll have to see if I can squeeze a cost in somewhere. I can always use the portalsmod.properties file to do this though. Completely possible though and I'll try to include it for release.

 

 

Can the list of places you can port to/kingdom choice happen for all player built portals automatically, and have you port back to the portal you left from (like epic).

 

For now I was making this more for GM-made portals, but it could work for player-made ones. I was trying to think of some way to handle player-made portals, like maybe a set of defaults that you can set up in the properties file that would apply to a player-made portal. I know for me, I'd like to find some way to let players do more with portals than just go to "epic" and back, but I also wanted to find a way to balance it (like hook it into a spell, maybe courier/dark messenger - distance based on portal QL and spell power).

 

 

Hi Keenan,

 

                to start off, thanks for all the great work you are doing, I know lots of people greatly appreciate it ! :)

 

                Ok, will it be possible to make it so that if you are riding a mount and use a portal the mount will go through also ?

 

                Not a cart or wagon, just a mount that you are riding, maybe even leading, I dont know.

 

 

                Thanks :)

 

I have a NoVehicles flag built-in to the current design, as I was thinking about this. Mount shouldn't be hard, though I don't know about cross-server - it was one of the things I wanted to look at. (Always been curious why we can't take animals cross-server). Now I might try to see if I can find a way to limit specific types of vehicles - or better, combine this with the idea above to charge a fee for using the portal based upon what you're trying to haul through.

  • Like 1

Share this post


Link to post
Share on other sites

I will certainly be needing/using this mod for going between my PvE cluster and my Epic-like cluster! (Once the separate player files happen, haha) Looking forward to watching your progress. :D


Share this post


Link to post
Share on other sites

I will certainly be needing/using this mod for going between my PvE cluster and my Epic-like cluster! (Once the separate player files happen, haha) Looking forward to watching your progress. :D

 

A little slower than I thought today - real life stuff and all... but I'm a coding beast once it gets dark... It's like the sunlight debuffs my coding abilities, I swear. Expect to see more progress in about 12 hours. (Which reminds me, I need more coffee!)

 

Also a lot of what I'm going to be doing is just using the existing code and changing the hard-coded checks to use the new data I've made for portals. That's pretty much why they're broken to begin with - checks for specific situations like isChaosServer (which checks to see if the Server's ID == 3) or to see if it's an entry/Login server and prevent portals leading back. Since most WU servers are also login servers, this isn't ideal at all. Also not all Epic-flagged servers are intended to be like the Epic cluster either. 

 

That reminds me, I need to find a way to specify servers that you can't portal to! Probably in the properties file. I can't see that being something that would need on-the-fly changing so much as something you'd set up when you add new servers. :)

Share this post


Link to post
Share on other sites

I think making the portal need Favor for cost would give priests a larger roll :)


Share this post


Link to post
Share on other sites

This mod sounds sweet.  Here's how I'd like to see it work:


 


1) GM creates initial portal(s) in starter town(s).


2) Players create an Epic portal, and choose the "starter portal" name to link to.


3) Travel can only happen between these two destinations.  If you right-click a portal in the starter town, you can only go to your portal, or to other "starter portals" if they exist.

Share this post


Link to post
Share on other sites

I'd like to be able to have portals be GM-created only and then be able to have a sort of checkbox on creation as to where it would go and what it would change... For my server, I want to keep skills between the PvE and PvP clusters, but keep items separate... I imagine it would just need to take the player log and copy only the skills section or something. If this is possible, I'd just have everyone log into the PvE server and then travel to the PvP cluster, selecting kingdom when that happens and then spawning at whichever kingdom location.


Share this post


Link to post
Share on other sites

What I would love to see :

- Static 1-to-1 portal (built by GM)
- Dynamic 1-to-? portal (build by players, keep only ref of the last portal used)
- "Return home portal" (hooking the /village command maybe ? would need to use a static gm portal)

- As cmiddlebrook said, portal fees would be cool.
- Usage limitation (in time) would be a good feature IMO.

I would be glad to help in the development of this mod if you need a hand. I have some experience with Java.

Share this post


Link to post
Share on other sites

It would be great if you can portal between allied deeds and spawn points on the same server and even better if we can do it while riding a cart/wagon/horse.

Share this post


Link to post
Share on other sites

I think making the portal need Favor for cost would give priests a larger roll :)

 

Do you mean needing a priest to "charge" it up or something? I was already playing with the idea of a spell mod after this so that priests could work with portals - either enchant up player-made portals or maybe even create temporary ones. I'm trying not to focus on that though, one thing at a time. :P

 

This mod sounds sweet.  Here's how I'd like to see it work:

 

1) GM creates initial portal(s) in starter town(s).

2) Players create an Epic portal, and choose the "starter portal" name to link to.

3) Travel can only happen between these two destinations.  If you right-click a portal in the starter town, you can only go to your portal, or to other "starter portals" if they exist.

 

I can see this being done. I'm probably going to have a decent (yet hopefully easy) configuration file for portals, especially what players can do. I was also thinking of hooking into object permissions, but I want to look at that after I get the portal system functional. 

 

I'd like to be able to have portals be GM-created only and then be able to have a sort of checkbox on creation as to where it would go and what it would change... For my server, I want to keep skills between the PvE and PvP clusters, but keep items separate... I imagine it would just need to take the player log and copy only the skills section or something. If this is possible, I'd just have everyone log into the PvE server and then travel to the PvP cluster, selecting kingdom when that happens and then spawning at whichever kingdom location.

 

Well, I did hit a bit of a stumbling block that might make this possible in the long run. I'm going to have to write a lot of my own transfer methods - I was hoping to tap in to what's already there, but there's too much WO-specific code that will cause a high chance of breakage. What type of items are you thinking? All items or just no-drop items? 

 

The only problem I see with separate skills is that it'll be up to you to configure the portals on the other end properly, or the skills will overwrite. I sketched out a design for a portal management feature, so you can see all the portals in the game, but that's not going to be something in the initial release. (As in, you would "link" two portals and it would compare the data and make it a matching pair)

 

What I would love to see :

- Static 1-to-1 portal (built by GM)

- Dynamic 1-to-? portal (build by players, keep only ref of the last portal used)

- "Return home portal" (hooking the /village command maybe ? would need to use a static gm portal)

- As cmiddlebrook said, portal fees would be cool.

- Usage limitation (in time) would be a good feature IMO.

I would be glad to help in the development of this mod if you need a hand. I have some experience with Java.

 

All of this should be in the initial release once it's finished. As for a helping hand, I'm not really set up to work as a team right now and a lot of the "work" has been more learning what the existing code does and BML (Wurm's version of it). BML is how the server streams GUIs to the client.

 

It would be great if you can portal between allied deeds and spawn points on the same server and even better if we can do it while riding a cart/wagon/horse.

 

This is one of the major features I'd like to have at release. I spent quite some time on Xanadu, and combining this with the fees asked for in previous posts, I see a perfect chance to make things easier on players while also helping to circulate more silver back into the server economy. Of course fees will be a configuration option :)

 

General Update

I didn't make a whole lot of progress on the code itself last night. I made some assumptions about existing code that were wrong, and I'm going to have to do a lot of the heavy lifting in the mod in order to ensure things work smoothly. This isn't me being critical of the code - it's just that these features were written for a specific set up for so many years and it's not going to be rewritten overnight for a more dynamic set up such as WU.

 

I also had to do a lot of learning in regards to BML, which is the markup language Wurm uses to send those GUI windows we all know and love. 

Share this post


Link to post
Share on other sites

As far as what I'd like to see is concerned, I imagine having completely separate item lists for each player on different servers and keeping skills across, overwriting them whenever a portal is used so that whichever server they are currently active on has the most up-to-date skill list. Any time a portal is used, the skill list updates, etc..


 


I also would consider allowing users to create portals if they required spellcasting and some rare materials and high crafting skill to create. Maybe high masonry required to even see the recipe (60? 70?), which creates a "portal frame", which needs to be enchanted to work, sort of like how mailboxes work.


 


Of course, I'd also like to be able to control whether or not users even have access to portals, but it sounds like you've already got that in mind, haha.


Share this post


Link to post
Share on other sites

This would be great to use with a karma cost on the same server with a list of the starter areas


Share this post


Link to post
Share on other sites

Has anyone figured out how portals are supposed to work by default?


Share this post


Link to post
Share on other sites

I think the problem is the portals have hard coded server id's in places that mess it up for WU


Share this post


Link to post
Share on other sites

 

It would be great if this could also resolve hosted dedicated cluster servers described in the above thread.   Webba posted the issue here at the end of this thread above.

 

Quote

The issue here is when passing from one server to another it passes your client the game's "external ip" which when behind your router is infact your internal ip. I'd suggest looking into the sendTransfer method in the Creature or Player class if you want to try to make a quick fix, could probably make a fairly simple workaround mapping the external ip to the real external ip, this might take some tweaking so it doesn't break clients on your network though.

 

Since all the dedicated servers have their own private 1918 RFC addressing as the external_IP field it causes and issue as its sending this IP to the clients instead of the public facing firewall IP which is NAT'D back to each of the servers in the cluster... 

I don't have the coding experience to fix this.    It would also have to consider the clients (me and my wife) who site on the local LAN.    We'd still need to transfer to the private inside addresses.   

 

 

 

Share this post


Link to post
Share on other sites
On 1.11.2015, 12:19:31, Xyp said:

Can the list of places you can port to/kingdom choice happen for all player built portals automatically, and have you port back to the portal you left from (like epic).

 

i dont know if this is a good idea. if i build a portal inside my deed, others would be able to teleport into my deed :/

 

maybe it would be good if we have 2 different portals official portals created by gm´s and playermade portals, so they can port to the official points. or if not, they should be able to select who may port to ther own portal (like role settings)

 

os it possible to port with a horse or cart/wagon?

 

Eject

Edited by Eject

Share this post


Link to post
Share on other sites
On 01/11/2015 at 10:40 AM, cmiddlebrook said:

Sounds great! Will there be an ability to implement some kind of cost to using the portals? I like the idea of being able to travel to different areas of my map but if it's just free then it would feel like a bit of a cheat :-)

 

I'd suggest a decay time for usage. You can use the portal one way but need a day (game time) before you can use it again to go back. That would stop people using it as a shortcut to mines etc. I have a mine that's a fair distance from my settlement, I'd love the portal to travel to the further reaches of the map but I can't trust myself not to use it for a quick path to the mine and back.

Share this post


Link to post
Share on other sites

I love the idea.  I'm trying to recreate the moongates from Ultima. What I'd like to be able to do is have a portal open at regular period of the day (hour), only for a specifiable period of time (10 minutes) and have the destination dependant on the time of day.  Is that doable?

Share this post


Link to post
Share on other sites

Hey keean,

  Are you still working on this or has it fallen by the way side?

  • Like 1

Share this post


Link to post
Share on other sites
On 2/5/2016 at 1:58 AM, bigsteve said:

Hey keean,

  Are you still working on this or has it fallen by the way side?

 

Question seconded!

Share this post


Link to post
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
Sign in to follow this