Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - thistleknot

Pages: 1 ... 15 16 [17] 18 19 ... 140
241
I'm thinking instead... of xml files.

The raws should be loaded into xml's, comments and all.  The goal is to preserve original file structure (comments and their contextual positions) and token information.

Then some custom patch files are based on the differences based on the xml token's.

Then you have a standardized format that is based on something that works with xml encapsulation vs some other arbitrary patch algorithm.  Only catch is, someone would have to make xml structure to read the raw files (I'm reading up on TinyXML, but not necessarily volunteering). 

Then another program to measure differences between the two xml's of each compared file.

Of course then another overall utility to implement those changes in a way similar to rubble, mod manager, or mod base.

242
I have a few suggestions for ease of use of your app.

Dwarf Fortress should be a subfolder of rubble.  As is, I had to make a mess of folder trees to get rubble and dwarf fortress separate from each other for my mod managing purposes.  From the warning listed, it sounds like I DO NOT want to have anything but Vanilla Dwarf Fortress listed because it will ERASE a bunch of stuff including graphics packs as it warns me to back them up if I want them.  So yeah, separate folder for rubble.

Maybe a menu item to download most current zip from the homepage?

Also needing a save is kind of weird.  If a world needs to be genned and a save generated, maybe a popup notice on the "no save found".

I wasn't aware how to download addon packs from just running the gui.  I don't know if there's a repository of pre-supplied add-ons, are they user generated or automatically generated?  Is that the "readme section" for modders and there just isn't anything available atm.  Is there another thread post with addons?

My addons currently listed are just: "base" btw.

Also, having no addons listed and how to acquire more isn't self explanatory from the "readme" that is specifically for non modders that pretty much says to just run the gui.

Prepping region1 results in an error, also prepping raw results in the same error.
Code: [Select]
Entering Prep Mode for Region: region1
Error: GetFileAttributesEx ../data/save/region1/raw/prep: The system cannot find
 the file specified.
  Near bad_position|L:-1

Prepping a region I have no idea if it results in a corrupt data set with the error or not.

Just a few first impressions.

I'm glad you have a gui though.

243
DF Modding / Re: [MODDING] 0.40.x QUESTIONS THREAD
« on: August 15, 2014, 07:42:46 pm »
If I say... wanted to parse a raw file for it's <tokens>.  Is there a defacto dependency list of token's somewhere, like a XML tree structure to better define a class of <token>'s?

So far I was just going to keep track of the file_name

Then the objects will identify the object id
and then the id's will be listed

so I figured I'd keep track of each id on a 1 to many relationship with an id's tokens.

But that was about the extent of it; however.  There's are token's like castes that have some dependency important relationships.  I was wondering if there was a tree structure view of the raws I could browse.

Update:
Thanks to World Viewer author, I realized I need to be looking at Raw Explorer.  I've even used that tool...

Update:

http://dftokens.gumpstudio.com:8080/DownloadTokens.aspx


244
I did all that... with simple strings... I could reference certain values of certain tags of certain objects, like creating a sword with a damage value dependent on that of an existing sword.

Quote from: Magic Weapons submod of Martial Arts+
[ITEM_WEAPON:ITEM_WEAPON_SSWORD_CRUEL]
[NAME:shortsword:shortswords]
[ADJECTIVE:Cruel]
[DAMAGE@:%ITEM_WEAPON_SWORD_SHORT+10:GORE]
[WEIGHT:35]
[SKILL:SWORD]
[CRIT_BOOST:1]
[TWO_HANDED:4]
[MINIMUM_SIZE:4]
[MATERIAL_SIZE:6]
[STICK_CHANCE:30]

It's context-sensitive in this case (pulling the damage value from the same spot of the same tag of a different item of the same type), but was intended to work just as well for different-type objects and different tags.

I think your tool needs to be updated to include castes then. However, I think a simple collection of "patches" that players could load on vanilla would be the next step. I do know ur tool required vanilla as a base but the steps seedseem a bit cumbersome. I would think a simple batch file should all that would be needed to apply some patches to vanilla

245
Utilities and 3rd Party Applications / Re: Mod Tool Merger
« on: August 15, 2014, 03:18:12 pm »
I'm hoping to read a raw file. Load all its values as either tokens (tags) or comments. Then compare tokens with another mod. Some tokens will be noticed missing and some added between two versions. That is what I hope yo achieve vs a standard diff file.

I got my classes setup for my tokens. I figure by tonight I'll have all the tokens at least loaded from a file

246
One way I was going g to deal w mod conflicts was...

To do the merge conflicts manually, derive a patch between vanilla and my now manually merged mod.

Only issue is. This has to be done ahead of time and it would mean a modder would have to manually do the merge.  However... It is possible but its no different than doing it manually it's just you have a patch file afterwards. Case in point. Accelerated mod + modest mod changes both alter creature and things like arcvision and clutch size at the same spot in creature files... So... A modder could make that patch file afterwards, but this isn't an ideal solution.

247
the entry procedure errors [for my builds] was because I wasn't importing my qt .dll's back into the dt folder...

no issue here guys.

248
Utilities and 3rd Party Applications / Re: Mod Tool Merger
« on: August 15, 2014, 02:12:04 am »
how/who breaks up a mod into it's components like that.  Someone was asking about that earlier in this thread http://www.bay12forums.com/smf/index.php?topic=142188.msg5571264#msg5571264).  Only way (and I see you have it done) I figure is by manually splitting up the patch files into specific subsets.

249
Utilities and 3rd Party Applications / Re: Mod Tool Merger
« on: August 15, 2014, 02:05:00 am »
well your concept is based on deriving diff's.  And you're discussing how to model those diffs.  I was just mentioning in this thread that I had started how my code base is starting to line up with the functions that are in these other projects (mainly to parse the tag's).  Which is the 1st step in understanding the differences in an objects tag structure.

And...

Update:
Finally got it to start counting my brackets properly.

FTW.  Onward!

250
Utilities and 3rd Party Applications / Re: Mod Tool Merger
« on: August 15, 2014, 01:33:00 am »
well I always said if someone else writes something better, so be it.

I have about 1 more week before I start school.  Although, I was trying to pick this up as a hobby/resume project and hopefully continue to work on it for about 5-6 hours a night for the next week.  After that, I might get 10-12 hours a week in on it.  Hopefully it's fruitful.  If I port any classes over from these other projects, I'll try to incorporate them as best I can in their original structures so if someone else wants to continue with any codebase I do in QT.

Of course, I am a newb.  I might have made some horrible design flaw early on in my programming (pop up forms vs tabbed form being one example).  I have no idea how hard/long it would take me to do basic design changes... However... that's part of the fun.

Here's some of mod manager's original python code.  This is about where I'm at atm.  I'm about to start parsing objects in.

Code: [Select]
class DataSet(object):
    def __init__(self, objects, included_files=[]):
        self.objects = objects
        self.included_files = included_files
        self.objects_map = {}
        for object in self.objects:
            self.objects_map[object.root_type + object.type + object.name] = object
       
    def get_object(self, root_type, type, name):
        key = root_type + type + name
        if key not in self.objects_map:
            return None
        return self.objects_map[key]
       
    def add_object(self, object):
        self.objects.append(object)
        self.objects_map[object.root_type + object.type + object.name] = object

I was looking at modbase.  I don't have a vb app atm, but... I can start reading the Class definitions of the C Code.   I see where it parses at least.

251
Well I'm a newb at qt but... If I had access and collaborators maybe we can port it over
.so far the app I'm working w has two panes side by side for file loading
 I figured I was gone a make it look more and more like mod manager but modbase sounds like a good candidate as well. I figured at some poi t I was gonna port some code over from another tool.

I don't know if anyone cares to learn qt w me cough cough "Sean". Especially if one knows VB already. Practically the same.

252
note: I use tag/token interchangeably.

it seems like your whole idea is centered around the same concept I gleaned from using github.  Start with vanilla, then add to it and derive patches (really no different than software merging I guess, which is still something I just recently learned).  Basically, make whatever mod you want.

I think Putnam wanted to make the system for "packaging" the mods with patch files in the same manner.

That's what got me started with this mod tool merge idea.  Having to MANUALLY resolve conflicts is what I was thinking google-diff-patch-match might do 'auto-magically'.  I initially wanted to create a tool that patched raw files using that library, but... alas I decided to manually parse the files and keep track of tokens instead.  I would still like to implement the patch algorithm, but I think keeping track of an object's entire set of tags in their ordinal positions before and after merge should be enough to keep some sort of state tracking system for the object.

Anyways, when I realized why diff patch's conflicted, I figured if there was a special way we can work with the raws maybe we can isolate those merge conflicts, that's where my concept of tag tracking came in.  Keeping track of an entire object's tag state from both sets of files to be compared with (say base vanilla against mylittleponymod).  One can either see entire new entities created, or entities modded, or deleted, etc.  But it would be like a tag definition of the object before and after merge.  Like an additive/subtractive tag diff.

253
Although this is a crosspost.

I was thinking of a class definition for tagToken's

And keeping track of tagToken's within entities would be a good start.

Spoiler: tagToken.h (click to show/hide)

254
Utilities and 3rd Party Applications / Re: Mod Tool Merger
« on: August 14, 2014, 09:23:57 pm »
hey... I just made my own class to handle tagToken's...

Code: [Select]
#ifndef TAGTOKEN_H
#define TAGTOKEN_H

#include <QtCore>

class tagToken
{
public:
    tagToken();

private:
    QString nameOftagToken;

    //line # of file token was on
    int rowNumber = 0;

    //colNumber token started at
    int colNumber = 0;

    //Either an identifier such as Object:
    //or What is specified after Object: such as creature
    QString objectInstance ="";

    //is tagToken "Object:" ?
    bool objectIdentifier = 0;

    struct tokenInfo
    {
        bool openBrace = 0;
        bool closingBrace = 0;
        bool whiteSpace = 0;

        //it's a comment if there is no nearby [ or ]
        bool comment = 0;

        //are there newLines in this token?
        bool newLines = 0;
    };
};

#endif // TAGTOKEN_H

this code I planned on doing more with, but as I parsed the file, I could backupdate new data structures since I keep track of the parent object.  I could do further matching on token names, and identify subclasses of tagToken's, such as Caste, and check dependencies.

Also tokens could hold information regarding their line position, but I don't think that's too important, but knowing whitespace can help preserve the same format when rewritten so as to avoid excessive contextual differences between two files.

I set it up, so I could load up a comment with new lines as a tagToken as well as regular tag's, so when outputted, it could reference the boolean flags in the object to see if it needs to rewrite brackets or not (or leave as a comment) and hopefully leave the correct whitespace and/or tab's...

remember, this is a primitive mockup.  I started thinking about it last night and coding it today, but I haven't implemented it yet beyond creating a qvector so I can keep track of each and every tag.

Then I would probably derive a patch file based on the ordinal differences between tag positions of two objects.

Yes, I am aware I have no accessor functions setup atm.  I just noted the private vars I think I would need.

Update:
So... made some good progress for a newb today.

I have my environment setup to start parsing the entire file, whatever it may be.

Step 2 is to read all the tokens in a qvector.

Step 3 is to create individual objects and their respective tokens.

Step 4 is to compare the differences between two objects from two different files


255
DF Modding / Re: [MODDING] 0.40.x QUESTIONS THREAD
« on: August 14, 2014, 05:35:50 pm »
apparently it doesn't error, but it also doesn't work.

I copied the human to human2 and did a

[creature:
human2]

and tried to create him in the arena, and doesn't list.

I made sure I appended caste name and game name to human2 as well, just the regular old human shows up.

I only asked because I want to parse some files and that may have an affect on things.

I think the game is just skipping the broken object in this case.  I would imagine it would do the same with other broken [tag]'s.

Pages: 1 ... 15 16 [17] 18 19 ... 140