Page 1 of 7 123 ... LastLast
Results 1 to 15 of 94

Thread: StompyNZ's Config Editor and Mod DB

  1. #1
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,508
    Rep Power
    1

    StompyNZ's Config Editor and Mod DB

    INTRO
    Back in August 2015 I found myself playing on a lot of modded servers, and the problem I had was working out what changes had been made. This gave birth to the idea of a GUI interface to the xml config files, with support for mods as well.

    http://7days2mod.com/ was born as a result of this. What started out as just the blocks, items and recipes quickly grew into a GUI for the entire config of 7days to die. Along the journey to today I discovered a lot about xml and interacting with it via php. The first iteration converted the xml into an array, but that caused a lot of other problems, then I looked at simple_xml, but that too had issues I wasn't happy with. The third complete re-write of the system was the one I finally settled on, using php's DOMDocument class and XPath and I have found this to be a very useful way of navigating xml. This system has nice built in functions for creating consistently clean, well formatted code (ideal when using xml compare tools).

    CONFIG GUI
    http://7days2mod.com/ has both a GUI view mode, and an XML view mode, which lets you see the data in nicely formatted and sortable/filter enabled tables and detailed views, as well as a color enhanced xml view.


    The GUI view mode has links from the data to relevant parts elsewhere in the data. For example in the detailed blocks/items view things like materials, buffs, gun parts, recipe ingredients, upgrade/downgrade blocks etc are all click-able links that take you to the detailed view of those nodes.
    In addition to this there are the recipes for each block/item and what books are required to learn those recipes, lists of what loot containers/groups they are found in, entities that drop them in loot, the materials view lists what blocks/items have that material and so on.
    I will showcase most of these features in an intro video when I get a chance to record it as listing everything here would take far too long
    On the table views you can sort on each column (shift-click to sort multiple columns at once), you can filter every column with a fuzzy search, both of which are pushed to the url so that you can pass sorted and filtered links to others (for example http://7days2mod.com/_blocks#&sort(b...model%2C%2C%2C shows all blocks that contain model in the shape property, sorted by Shape and then Model)
    You can also change which columns are displayed on the table view via the Select Columns button. Which columns are shown are controlled via config files and future plans include the ability to customize which columns are displayed which a user will be able to save to their profile.
    The Nodelist view (http://7days2mod.com/_blocks_nodelist/view=showcount) shows all of the unique nodes found in the files that have this feature (currently blocks, items, buffs, materials, entity_classes) with a number in brackets to show how many times it was seen.


    MODS
    When it comes to Mods, the system works like this: http://7days2mod.com/ModName/ModVersion/_page (where _page is the name of the section, for example /_blocks or /_recipes), so for example the vanilla code is found at http://7days2mod.com/7d2d/14.6/, however http://7days2mod.com/7d2d/ will also point to the currently selected master version (editable via the Mod Admin page), and http://7days2mod.com/ by itself points to the vanilla mod and latest version. If the mod doesn't include a file that is found in the vanilla code then when you try to view those sections the vanilla code will be shown instead, with a note to indicate it is showing vanilla info.
    Each Mod has its own landing page where you can provide any info you want for your mods, including links to additional resources such as dll downloads, instruction guides, forums posts, etc

    CONFIG EDITOR
    Some time around early November it became apparent with the XPath system that creating a full fledged xml editor was possible and so work began on this side of the system. The system for this is now in place and the finishing touches on the Save Mod feature is close to complete (work keeps interfering with the time I can spend on finishing this). To access the editing functions requires logging in to the site via steams OpenID system.
    The goal of this tool is to allow Mod creators to showcase their code and also be able to edit with a powerful editing tool, but also to allow casual players who like a mod to be able to find all the juicy details of the mod without having to read confusing xml code, and even create a sub version for their own use with tweaks to the original mod. Mod owners will be able to see these sub versions and can choose to publish them under their Mod.

    XPATH
    XPath Actions: One way to do edits is through the XPath action system. The strength of this system over something like notepad is in the ability to make vast changes in just a few simple steps, as well as a complete version/edit history and also the ability to apply XPath actions to any config weather vanilla or modded.
    For example http://7days2mod.com/_xpath?xpath=//...%22Loot%22]/.. would find all blocks with the <property name="Class" value="Loot"/>
    With this search you could then append a node to all of those blocks in one step with the 'Append' action and <property name="description" value="this is a loot container"/> as the xml code.
    This generates a file for the xpath search and action, and an action file with the xml to be used. With those generated files you could then apply the same xpath action to any mod.
    This method also allows for the parent mod (or master mod as I have named it) to be easily changed via the Mod Admin section and then the config generated based on the new base configs selected (for example: an easy way to update a mod when new patches are released)
    It will also allow xpath modlets to be created and then the ability to include these modlets into any mod via a page of checkboxes etc. The modlet can for example add a weapon to the items, and also include it in relevant loot containers.

    XML EDITING
    You can now edit the xml via one of two javascript editors. Codemirror editor is similar to notepad and you can in fact copy/paste between the two programs via this editor.
    The GUI edit is a javascript called Xonomy and allows for context menus and code validation.


    PLANNED FEATURES
    Some of the major planned features are:
    • Finish the Published mods auto listing page.
    • Show properties from extended blocks/items in the table view and details pages (currently entity_classes has this function on the detailed view) - Done but too slow so needs recode
    • Allow custom views to select which table columns are shown by default.
    • Loot tree view, with the loot containers expanded out (current just a flat view is available, for example: http://7days2mod.com/_loot_container/id=11) with drop percentage probabilities included.
    • Mod CSS editing to further customize the look of a mod GUI. Currently only the banner image for the mod can be changed.
    • Random Entity wizard - Select a group of templates and ranges for variables such as walktype/speed etc and have the wizard create those entities randomly and generate the classes and spawning to include them.
    • RWGmixer wizard - for creating a custom rwgmixer with checkboxes for which prefabs to include etc
    • API - this system will be created for the editing interface, if people find a need for it I will open it to cross domain access. This system could also allow for a modlet to be run on servers or by server manages to allow for config updates to be pushed to servers without the need to download.
    Last edited by StompyNZ; 06-07-2016 at 04:43 AM. Reason: Updated Info

  2. #2
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,508
    Rep Power
    1
    Also big thanks to the Alpha testers and those who gave feedback along the way:
    Mythan, Valmar, Stallionsden, Magoli, Clockwork Orange, Hotrod, Slaan, Sorrowthief1, Guppycur and any others who I may have forgotten that I showed it to (especially Valmar whose insistence in using spaces in his item names drove me crazy )

    FAQ

    Q. Does the site store any personal data such as steam passwords.
    A. The login via steam uses a system called OpenID so at no point does 7days2mod.com have any access to your private password. The site stores the SteamID and a couple of bits of publicly visible information (persona name, avatar image etc), so if you want to restrict what the site can access then simply restrict that info in steam itself. Once a verified login is confirmed the site uses a cookie to track the session via the steam ID. More info on the steam site here

    VIDEOS
    Introduction and Feature Tutorial Video
    RWGMixer Tutorial Video
    Last edited by StompyNZ; 06-07-2016 at 04:45 AM. Reason: Added video links

  3. #3
    Colony Founder JaxTeller718's Avatar
    Join Date
    Aug 2015
    Location
    The Clubhouse
    Posts
    3,068
    Rep Power
    1
    ♥♥♥♥ing amazing

    I love you, and I love this. Great work!

  4. #4
    Colony Founder Tin's Avatar
    Join Date
    Feb 2014
    Location
    In between
    Posts
    4,414
    Rep Power
    1
    Cool stuff! Nice work!!

  5. #5
    Leader
    Join Date
    Mar 2014
    Location
    Brisbane, Australia
    Posts
    5,092
    Rep Power
    1
    Amazing work StompyNZ :-). This has been a work in progress and you have done a awesome job :-).

  6. #6
    Colony Founder Clockwork Orange's Avatar
    Join Date
    Nov 2015
    Posts
    2,416
    Rep Power
    1
    Awesome, I will have to start using this for A14!

  7. #7
    Guppycurian Forum Whore Guppycur's Avatar
    Join Date
    Apr 2014
    Location
    Houston-ish, Texas
    Posts
    15,917
    Rep Power
    1
    I'm so jealous of the crap you can do.

  8. #8
    Tracker mythan's Avatar
    Join Date
    Jan 2015
    Location
    http://oz.nz
    Posts
    230
    Rep Power
    0
    Oh yyyeaaah! I've been waiting for this. Nice one StompyNZ!

  9. #9
    Community Moderator OzHawkeye's Avatar
    Join Date
    Sep 2014
    Location
    Australia
    Posts
    3,392
    Rep Power
    1
    EXTREMELY impressive. I'll definitely be trying this out.

  10. #10
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,508
    Rep Power
    1
    Thanks guys

    Just the motivation I needed to get cracking on finished those last few niggly bits off to get the editor functions all working.

    I'm away for the weekend but will spend some of my evenings next week to get the editor going and finish the mod admin stuff.

  11. #11
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,508
    Rep Power
    1
    Fixed my first bug since making this post too the groups link as seen in the bandage screenshot was missing the csv tag and also pointed to the groups.xml file, added the tag and pointed it to the misc.xml groups instead

    I better not do anymore, I'm onto my 11th bourbon for my birthday eve session (I may have peaked too soon )

  12. #12
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,508
    Rep Power
    1
    Having said that, I'm still not 100% sure which groups should be used. I assume the misc ones, but there are blocks and items that have the Decor/Miscellaneous group from groups.xml and nothing in the misc.xml group Furniture/Decor.

    groups.xml has:
    Ammo/Weapons
    Building
    Chemicals
    Clothing
    Decor/Miscellaneous
    Food/Cooking
    Forging/Molds
    Medicine
    Resources
    Special Items
    Tools/Traps

    misc.xml has
    Ammo/Weapons
    Basics
    Building
    Chemicals
    Clothing
    Food/Cooking
    Forging/Molds
    Furniture/Decor
    Medicine
    Miscellaneous
    Resources
    Special Items
    Tools/Traps

    In game crafting menu has:
    Basics* (not in groups file)
    Decor/Miscellaneous* (not in misc file)
    Ammo/Weapons* (both files)
    Building* (both files)
    Clothing* (both files)
    Food/Cooking* (both files)
    Medicine* (both files)
    Resources* (both files)
    Tools/Traps* (both files)
    Chemicals* (both files, campfire only)


    Edit:

    Ok, so did some testing and it seems the groups.xml and misc.xml groups section are both totally irrelevant.

    Commented out the entire groups section in misc, and the entire contents of the groups.xml file and it made zero difference in game. Changing the color in the groups file does nothing as that is legacy from a12, the new UI doesn't use the color or alpha settings from what I can see.

    The only errors I got were when the entire groups.xml file was commented out it complained about it being empty, but game still ran fine, and if I deleted the groups file it hard crashed on trying to load into a game.

    So the only valid groups are:
    Basics
    Decor/Miscellaneous
    Ammo/Weapons
    Building
    Clothing
    Food/Cooking
    Medicine
    Resources
    Tools/Traps
    Chemicals (campfire only)

    and they all have nothing at all to do with either groups files
    Last edited by StompyNZ; 02-19-2016 at 11:47 AM.

  13. #13
    Guppycurian Forum Whore Guppycur's Avatar
    Join Date
    Apr 2014
    Location
    Houston-ish, Texas
    Posts
    15,917
    Rep Power
    1
    It's your site, no one knows the xml's better than you, group 'em how it makes sense to you.

    Happy Birthday kiwi.

  14. #14
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,508
    Rep Power
    1
    Added the first question to the FAQ in the second post

    Also uploaded a new version of the site which I had forgotten to do last week. Now all the XUI and progression page detailed views are present and a few other fixes.

    Updated these mods latest versions:
    XML Fixes 1.16
    Valmod 18.41
    Compo 17

    Added a second question to the faq as it may not have been clear from the first post that the edit/save functions are not quite completed yet.
    Last edited by StompyNZ; 02-20-2016 at 05:12 AM.

  15. #15
    Leader
    Join Date
    Mar 2014
    Location
    Brisbane, Australia
    Posts
    5,092
    Rep Power
    1
    I no see mega city lolz :-P

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •