Open Source Layout Editor

Discussion in 'Norrathian Homeshow' started by Sennen, Mar 18, 2016.

  1. Sennen Well-Known Member

    https://github.com/JitteSochin/EQ2LayoutEditor

    Little project I've been working on over the course of a few years. Originally on SourceForge, but moved to GITHub due to SourceForge's demise. I've recently put a bunch of work into making it compatible with the EQ2 designer outputs as well as fixing a few things that bugged me about it.

    This provides the ability to:
    • Mass move items
    • Mass Crate items
    • Rotate items around a point
      • Draw Circles (On any axis)
      • Draw Spirals
      • Draw vertical spirals (Staircases)
    • Tile items in 3 dimensions
      • Can alter the spacing on all axes,
    • Rotate groups of items
      • Can rotate on any axis, it gets funky when rotated on non-Z axis and the item was previously rotated. Working on this
    • View differences between layout files
    This resides entirely in code format. It was written in C# on Visual Studio 2013. I don't think that you would have issues editing it in 2015.
    https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx
    I'm still new to GITHub and am trying to see if I can post the compiled executable for consumption.
  2. Sennen Well-Known Member

  3. Eliohia2 Active Member

    will have to check this out...
    ;)
    Uwkete-of-Crushbone likes this.
  4. Eradani Well-Known Member

    open source :D and... runs on winxp :D :D
    Uwkete-of-Crushbone likes this.
  5. JesDyr Well-Known Member

    nice :)

    Will take a look later.
    Uwkete-of-Crushbone likes this.
  6. suka Well-Known Member

    hmm- so how does this compare the JesDyr's layout editor? or is everyone aware that we have had his for quite a few years now? he even has a lot of videos on the use and updates it regularly.
    Edelphia and Uwkete-of-Crushbone like this.
  7. Chrissdae Active Member

    Not sure what code format means. Is it an actual program, or just coding ?
    Uwkete-of-Crushbone likes this.
  8. flameweaver Well-Known Member

    It's open source, as I understand it the code format is the source code that anyone can read, edit and recompile to either fix bugs, add new features or even create a new version. The executable file that the OP posted in post 2 is the actual program.
    Uwkete-of-Crushbone likes this.
  9. Sennen Well-Known Member

    The 2nd post contains the executable for download. I've not created an installer.

    From http://www.eq2designers.com/?page_id=7: Last update shows Version Up 6/22/12 (Version 1.7.2.14)
    The two programs should be compatible with the others' output, and I've been able to incorporate all of the functionality plus a few bug fixes.

    I've also made it open source so it can be a community project and not just a one man show. I'd like to see a wonderful collaboration of teamwork that can take a layout editor to it's absolute extremes like 3D previews, mock environments that show how everything looks, housing borders for interior walls, etc. While I write good programs, I don't know how to do everything. Plus I could be doing something in a way that could be done a lot more efficiently.

    The source code is there for review and if you are so inclined, you can even download it. If you're even more inclined, you can contribute to the coding for improvements.

    If you want to learn to program, open source software provides a world of great examples of how things can be done. I started back in 1996 through online chat rooms for programmers asking a bunch of questions. A few years later, SourceForge came out and I took from others examples. Now with Google and many open source platforms, you can quickly learn how to do some really cool stuff. Microsoft has even made a free version of Visual Studio (Community) so learning to program is easier than ever!
  10. Sennen Well-Known Member

    lol, just noticed that you jumped on in this. Feel free to contribute as well!
    Also, there's a bug in your load script that throws anything after a " in the item name into the memo.
    Uwkete-of-Crushbone likes this.
  11. JesDyr Well-Known Member

    I had so many plans as well, but the amount of effort into not only building but also maintaining some things is high and I never got around to it.

    It was commas that messed it up since I was just using a split(","). In 1.8.x.x I changed it to use the following that should escape the double quotes. Note that the game's load script ignores everything after the crate value.

    Code:
         
    private string[] SplitCsvLine(string line)
            {
                return (from System.Text.RegularExpressions.Match m in System.Text.RegularExpressions.Regex.Matches(line,
                @"(((?<x>(?=[,\r\n]+))|""(?<x>([^""]|"""")+)""|(?<x>[^,\r\n]+)),?)",
                System.Text.RegularExpressions.RegexOptions.ExplicitCapture)
                        select m.Groups[1].Value).ToArray();
            }
    
    1.8.x.x. is a completely rewritten version of my editor I never released. I ended up scaling back the features since I no longer play EQ2. Even after taking a step back, I dont feel it was tested enough to be released. (Thank You Jazabelle for helping test). It is close, but I have some small changes I wanted to make to remove an unnecessary dependency. It has crossed my mind more than once to just throw it on a git repo and see if someone is willing to take it over. The code, even after the rewrite, is a mess. I had attempted to apply concepts I learned but looking at it now, I am not sure why I did some of the things I did.
    Uwkete-of-Crushbone likes this.
  12. Sennen Well-Known Member


    Welcome to the coding world... I actually rewrote something entirely for work the other day because I was embarrassed by the code. I use split for the everything up to the item name then IndexOf for the Item and Memo. And yeah, it doesn't matter what's after crate. Regex is a good idea as well, but that just confuses me :p
    Uwkete-of-Crushbone likes this.
  13. Smallcorners Well-Known Member

    For those of us that do not code, and really just want an easy interface with useful toys...er tools... to decorate with, what does this mean?

    I do have and sometimes use Jesdyr's program, as well as recommend it, but my use is not absolute as I am not a math genius and sadly suffer from mental fugue more often than I would like. Is this editor easy to use as a decorator?
  14. Sennen Well-Known Member

    I've taken as much math out of it as I can.
    For circles, it calculates how many degrees it will take for however many items you've selected.
    If you're tiling and have the wrong amount of items selected, it will let you know how many you should have selected. And also give you the option to just go ahead with tiling.
    If you're rotating a group of items, it automatically determines the center point for rotation. I may also add in a "Rotate around this point" option, but too tired to code lately after work.

    If I read JesDyr's previous comment correctly, they're not updating the current version any further. With that in mind, if no feelings will be hurt, I may replicate the rest of their functionality into this program. I think I have 90+% of it, just haven't fully used that one as I didn't know of its existence when I initially built this one.

    I've built several homes using this, and it doesn't take entirely too long to learn to use. One of the homes I've built is "Holidays of Norrath" on Antonia Bayle under massive homes. It was used extensively in placing all the tiles, the mirror maze, the rocks in the NotD room, the hedges and circle of roses in the Erollisi day room, the ceiling lights in the brewday room, the list goes on.

    If you want to see how extensive the item placement is in this home, check out the Kromzek home before decoration.

    I'm also working on an island home which involves scratch building a house over the ocean.
  15. Smallcorners Well-Known Member

    Will it have the New from Diff tool? I use that more than anything else!
    Uwkete-of-Crushbone likes this.
  16. Feldon Well-Known Member

    So I know better than to wade into this topic but I can't help myself...

    As stated, it's been 4 years since the last release of JesDyr's invaluable yet technically complex layout editor. Until enough tutorial videos were made, I think it was out of reach for most designers. Yet it's clearly powerful as it facilitates precise placement of objects in spirals and other complex arrangements.

    It's understandable that after 4 years, a competing program would appear with similar functionality. If I have any complaint, it's that an opportunity may have been missed to improve on the original by taking a different approach to the user interface or more casual-friendly design or just doing something unique rather than being such a close approximation.

    I know that JesDyr has largely stepped away from EQ2 these days and considers his newly rebuilt version of the layout editor to only be at a prototype stage, but I say get some testers trying it out. Consider a Patreon our GoFundMe to complete it. EQ2 decorators are passionate players and would help pony up support to get a new version of the layout editor completed.

    The EQ2 community benefits from having more tools and fan sites.
  17. JesDyr Well-Known Member

    I still want to release 1.8. I just haven't had the time or motivation to get it done. Every few months I renew focus and try to get it to the point I am happy, but I always get pulled away before then.

    I typed up a larger reply to your post but, I don't really want to muddy this thread up. It shouldn't be about what I did/am doing, it should be about what Sennen is doing and it comes down to that simple statement. I made my editor because I am passionate about this community and I have always supported others who wanted to make their own tools. This is just the first time one actually made it to the public.
    Uwkete-of-Crushbone and suka like this.
  18. Sennen Well-Known Member

    There is currently a new from diff. It's in the file menu as "Save Changes Only As..." Only works if you haven't saved the file since opening. I may do a file compare, but haven't looked into that too much. The way this program is structured, it shouldn't be too difficult as I can reuse the file manipulation class for multiple files (It's now the new from diff works)
    Motivation is the key. I code for a living (DBA) so I've been staring at code all day. By the time I get home and have the kids to sleep, I just want to kill some mobs or maybe tweak my AAs.

    I still need to generate a how-to on using this program, but if you've used JesDyr's, you should be off to a good start.
    Uwkete-of-Crushbone likes this.
  19. Sennen Well-Known Member

    Group rotate around point has been added and I've changed the highlight color of groups when selected.
    Uwkete-of-Crushbone likes this.
  20. Trixwynter Well-Known Member

    <sigh> another cool program that is over my head. I so want to use the layout editor but even after watching the videos (multiple times) I'm left with tears of frustration. I'm just too blond for this kind of thing :(
    Uwkete-of-Crushbone and chattie like this.