MultiPort - The Monoport remake

Discussion in 'WIP and Development Status' started by 8e8, Feb 5, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    8e8

    So, as some of you may already know, I've been working on a remake of the ol' hMod plugin named Monoport. I've noticed that many were interested in seeing this brought to Bukkit, which I why I decided to do it.

    I just wanted to make a post about it to let ya'll know that I've been a bit busy with updating my other projects, but I haven't forgotten about MultiPort. It's just that making sure the other plugins are updated and working takes precedence over a new project.

    For those who don't know what Monoport is, here's the original topic: http://forum.hey0.net/showthread.php?tid=256

    Onto the good news...

    I believe I have worked out the difficult hurdles of creating this plugin, and have finished a majority of the methods planned for the first release. It may have been more complete than it is now if I just ported it, but there's no fun in that, and I (maybe the author as well) would prefer starting from scratch anyway. I plan on including all of the original features as well as some of my own ideas, and the ideas of others, but not all of them (including a few original features) will make it to the first release. I intend the first release to be proof of my work, and a preview of what's to come.

    Planned Features:
    • Original Monoport features
    • Toll based portals like in the original, but with price/item type being set by the creator, and Iconomy support
    • Private portals for both users, and groups
    • The ability to modify any aspect of the portal. This includes but is not limit to: name, location, structure, destinations, cost, portal height (see original topic for details), public/private, allowed users, and allowed groups
    • Control over whether or not a multi-destination portal will randomly select a destination or iterate through the destinations
    • Control over which blocks can be used as portal blocks, and if none are set then all are allowed
    • Control over which items are used for creating/using portals
    • I most likely will add sign support.
    As I've said: I'm willing to hear the ideas of others, so be free to suggest something, and I may include it as a feature.

    I will be getting back to work on this project maybe sometime later today or tomorrow. It all depends on how much time is needed to complete the update for my Vote (which will soon support multiple votes, and multiple choices/commands) plugin.

    I will not respond to any inquiries about when this will be finished, so please refrain from doing so. I am, however, looking forward to hearing some suggestions, and questions regarding features.

    Please be patient. I'll keep everyone who's interested in the loop about the status.
    --- merged: Feb 8, 2011 9:23 AM ---
    I just got a reply back from the creator of Monoport, and he supports my decision to go ahead with this. I also setup a wiki to stick the documentation in, and have put all my focus into working on this plugin.
     
  2. Offline

    Kayonesoft

  3. Offline

    Preston Taylor

    Yes please [​IMG]
     
  4. Offline

    8e8

    I've made the switch from flatfile to sqlite (which is still flatfile, except better) to make data management a breeze. Currently setting up the parser for loading/storing portal and destination data. After that it should be ready for some initial tests.
    ;]
     
  5. Offline

    Kayonesoft

    Bah, I like the flatfiles. I don't know a damn thing about SQLite.
     
  6. Offline

    8e8

    And you don't need to! It was my job to learn how to work it today. All you'll be required to do is download the sqlitejdbc connector, and stick it in the root folder of your server. If you're using a plugin like SpawnControl, you may already have it! It has the added benefit of being less prone to most of the problems associated with flatfiles. It doesn't give me a headache. Oh, and you can view/modify/delete entries from your database (provided you have sqlite3.exe or the likes).

    So in short, the bad new is you'll have to download a 2mb file in order to use the plugin. The good news is, you may already have it, and if not, you won't need to redownload it for any plugin that uses it. Also, Bukkit's Permissions might be going down this route. So in the end you may have to get it anyway!
     
  7. Offline

    Kayonesoft

    Ya I already have it, I thought I was going to have to use it to change settings. :/
     
  8. Offline

    8e8

    Ugh that was an ugly double post...

    @Kayonesoft
    Settings will be configured in the config.yml, and SQLite is being used to store portal/destination/block information. It shouldn't be tampered with anyway so making it hard to edit is another added bonus.
     
  9. Offline

    Kayonesoft

    Great!
    I'm still looking forward to this. [​IMG]
    Monoport was my favorite plugin, and similarly expressed by the few people on my server.
    It'll be nice to get it back.
    You're going to look into multiple world porting right?
     
  10. Offline

    Preston Taylor

    My server is dependent on this release, cant wait =)
     
  11. Offline

    8e8

    It's already setup for mult-world teleportation. I made sure to keep that in mind (although it isn't very hard). Still sorting out some parsing problems, so I'm unable to get a good test in. Should have something done by later today or tomorrow.
     
  12. Offline

    Kayonesoft

    Fantastic. Thank you for your hard work.

    Once this is out I can swap over to the multiworld release and start fixing my server up for play again.
     
  13. Offline

    Arcwolf

    Cant wait! I have a huge teleporter network just chilling here waiting for the plugin for it to function. Question: Will this import the previous monoport flatfile or do we need to recreate the portal links ingame?
     
  14. Offline

    Preston Taylor

    I know this will delay you and all, but PLEASE make this work with bukkits new multi world thing! It would make it 100x more amazing [​IMG]
     
  15. Offline

    8e8

    Update: I've been a bit busy the past couple of days and haven't had much time to sit down and go through the code, but there's progress indeed. I've got the parser for creating new portals/destinations done (basically gets all the values from player input) and the storing/loading of those objects (turning the objects into data which can be stored, and vice versa). I also finished the majority of the teleportation method which includes privacy detection, random/sequential destinations (sequencing is a WIP), and paying the toll.

    Still lots of work to be done with the modifcation commands. In the end I decided that I would just try to include all of the planned features to make development go smoother. While it means a more full featured plugin, you will have to wait longer.

    @Arcwolf
    I have not put that into any thought yet. I don't even know how they were stored in the old Monoport, but I'm sure it will be a lot different than mine. Maybe someone will come up with a converter once I release it.

    @Preston Taylor
    Already been mentioned dude.
     
  16. Offline

    Arcwolf

    Here's an example of one of my teleports as stored by Monoport

    d,AlnicoCastle,-99.5154326196633,70.0,1157.569424125597,5.8499284,-452.37317
    d,AlnicoExit,-390.672447861445,71.0,977.6827637626386,7.499979,14940.586
    e,AlnicoCastle,-391,69,978,0,0,free,AlnicoCastle
    e,AlnicoExit,-101,68,1157,0,0,free,AlnicoExit

    d=destination (I believe this part of old code could be used to make a converter)

    String playerLocation = player.getX() + "," + player.getY() + "," + player.getZ();
    String playerView = player.getPitch() + "," + player.getRotation();
    writer = new FileWriter(dataSource,true);
    writer.write("d," + location + "," + playerLocation + "," + playerView + "\r\n");

    e=entrance (and the following)

    String blockLocation = block.getX() + "," + block.getY() + "," + block.getZ();
    writer = new FileWriter(dataSource,true);
    writer.write("e," + name + "," + blockLocation + ",0,0," + usePayment + "," + destination + "\r\n");

    Four entries for two teleport pads. 1 for the Teleport's location and 1 for where its going to send you. The above might be helpful if someone wants to take on the task of a converter.
     
  17. Offline

    8e8

    Thanks for that. If anyone WOULD like to work on this converter I've also got some information.

    Here's the sqlite table for the portals:
    Code:
    portal name, list of people who can modify, is portal private?, are destinations chosen in random order?, is this portal triggered by step?, price to use portal, currency material, list of destinations, list of users (if is_private), list of groups (if is_private)
    name(text)|creators(text)|is_private(integer)|is_random(integer)|is_step(integer)|price(integer)|currency(text)|destinations(text)|users(text)|groups(text)
    
    Ex. 'spawn'|'8e8,player'|1|0|1|10|'IRON_INGOT'|'home,spawn'|'8e8,player'|'admins,moderators'
    
    This is the table for the blocks, which link to the portal entries
    Code:
    portal name, world name, x location, y location, z location
    portal(text)|world(text)|x(integer)|y(integer)|z(integer)
    
    Ex. 'spawn'|'world'|1|2|3
    
    For the destinations:
    Code:
    destination name, list of people who can modify, is portal private?, world name, x location, y location, z location, pitch, yaw, list of users (if is_private), list of  groups (if is_private)
    
    name(text)|creators(text)|is_private(integer)|world(text)|x(double)|y(double)|z(double)|pitch(float)|yaw(float)|users(text)|groups(text)
    
    Ex. 'spawn'|'8e8,player'|1|'world'|1.03|22.31|5.06|-12.001|32.311|'8e8,player'|'admins,moderators'
    
    This is what it looks like atm. I don't plan on changing it any time soon. So if anyone is up to it, feel free to make a converter.
     
  18. Offline

    Arcwolf

    I'm messing around creating a simple c++ converter for myself. I doubt I'll release it publicly, I just dont know enough yet to guarantee that it would work for everyone. Supporting it would put me in over my head... I'm crafting it for my specific flatfile.

    Um, anyway, I've parsed in all the monoport flatfile but I dont see any information on "exactly" what you are calling your tables in the db. Would you be willing to post a sample db created by your plugin? or even just posting a .dump of the db from sqlite3 would be cool.

    Also, if the portal is free what would be put into the price and currency values? I'm assuming 0 and free?
     
  19. Offline

    8e8

    Yes, 0 is free. The table names are: portals, destinations, and blocks. Simple enough right? I guess I forgot to mention that :p
     
  20. Offline

    Arcwolf

    Couple more questions, sorry :)

    About the portals table,

    is_step = 0 then what? what would the portal be from bedrock to 128? or click a sign maybe? Monoport allowed a user to specify how high above or below a portal a player could be before teleport would occur.

    currency = text ... what if the user enters a number value. Does the plugin convert it to item name or just put the item number into the db?

    destination = text ... home & spawn. Since random is 0 in this case I assume the teleport would be sequential. Then how does that work. If a player enters the first time its home, if player enters again its spawn? <confused>
    Maybe it always chooses home in this case? Well, guess it doesnt matter. I'm not really sure how monoport worked its random magic. Its not in the flatfile or the config and I never used it <shrugs> is_random default 0 :)

    :-/ hmmm, a couple of extra values that monoport didnt have. Guess I'll have to take some command line args or make some defaults :D defaults are fun!

    Also a few values you dont have that monoport had... this conversion is a little tricky... Wish I didnt have so many flippin portals, conversion would be unnecessary, it'd be easier to just recreate 'em. sigh...
    --- merged: Feb 14, 2011 12:12 AM ---
    Ok, I've got it making databases but I'm not sure if its correct. Would you kindly critique it and let me know if changes are necessary?

    Thanks :)
     

    Attached Files:

    • test.zip
      File size:
      700 bytes
      Views:
      1
  21. Offline

    8e8

    Sorry, but I haven't got around to the block height method yet. I've been busy but trying to work on this when I can. I changed things a bit and started making more of a game plan for how it would all work.

    is_step will be renamed to trig_method, and it will be text instead. The reason for this is because I want users to have a choice over how their portal will work. The default value would be both, and the other values are click (right-click) and step.

    currency is stored as text, but it will be able to handle both. The parser handles the intake of the values.

    is_random = 0 will cause destinations to be chosen in sequential order, from their first to last added destination. That means that if I walked through for the first time, the next person would be sent to the second destination on the list, and the third to the third, etc. The only time that sequence is broken is when the player using the portal doesn't have sufficient access to that destination (since they can be privatized too, in this case the destinations will be iterated through until one can be found, or until the list is empty), or the server is reset.

    Your DB looks right for the most part. Missing the creators field under portals, but that seems to be it ;]
    I guess it would be best to wait until I have finalized the database to finish the script, as it still may be subject to changes.
     
  22. Offline

    Arcwolf

    Ok, simple enough changes. I'll hang back and wait till things are more final. I might release what I have for a converter once your put out this plugin. No support from me of course but then I'll include the source so if it doesnt work for someone else they could always fix and compile it for them selves.

    So, I await your release with bated breath :)
     
  23. Offline

    rslink

    I have been making a map that requires Monoport, and it is the one thing keeping me on hmod. Thank you for doing this.
     
  24. Offline

    Preston Taylor

    Has any progress been made? It's been a while.
     
  25. Offline

    Top Quark

    Waiting with bated breath.
     
  26. Offline

    8e8

    Managed to find some time to dabble in the IDE, but it's going to be spent getting up to speed and updating my existing plugins. Sorry for the long wait folks. I kinda wish I had got it done before things got so busy.
     
  27. Offline

    Preston Taylor

    -bother-​
     
  28. Offline

    doubleobond

    Very excited about this. I think all the features you mentioned clear up all the requests I might have. Are you planning to release it doing the basic porting first (what the original monoport did)? Will the MonoportWarps file use the original format with all the new features being listed after, for easy porting over from hmod to bukkit?

    ie: e,3xp,-111,38,-43,0,0,free,3xd, new feature
     
  29. Offline

    Preston Taylor

    I guess this is an abandoned project :(
     
  30. Offline

    Arcwolf

    Potentially yes. I've seen no progress reports for quite some time on this which has prompted me to move to another portal plugin altogether. At least in the interm might I suggest EpicGates. It has nearly identical functionality to monoport. At least for me its was a stop gap until this was released. However now, I'm not so sure I even need monoport. I've already converted all my old gates over to Epicgates with minimal effort. I doubt I'll be converting over to this later... This has just taken too long for me and my server. There was just too much bitching for me to wait any longer lol.
     
Thread Status:
Not open for further replies.

Share This Page