Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5 ... 9

Author Topic: DF Mod Manager [0.7.1 release]  (Read 50499 times)

Artanis00

  • Bay Watcher
    • View Profile
Re: DF Mod Manager [0.5 release]
« Reply #30 on: February 24, 2011, 06:18:25 am »

This is pretty sweet. I like the .dfmod idea, though I dislike the loss of the filesystem form for use with source control.

Perhaps if something like git is installed a bare repo could be maintained per mod holding them... I wonder how libgit2 is doing these days, I could probably add that... but i digress.

I love working with Python, and would like to hack on this. Would you consider a copyright license to it (I'd recommend Apache license 2.0, since diff_match_patch.py is using that, but any license to modify and redistribute would work). Also, would you consider putting it on GitHub? (that would net you source control, code hosting, downloads, wiki, issue tracker, etc.)

Finally, a bug report for you (found it 30 seconds in): on line 227 of editor.py, you are not checking the bounds of a tuple before getting the first selection. This causes a pop-up error box, followed by a crash, upon using Save & Exit or Exit without saving, or using the close button in the title bar.

Code: [Select]

       
        self.PopupMenu(menu, event.GetPoint())

    def listbox_clicked(self, event):
        i = self.listbox.GetSelections()[0]
                                         ^ here
        object = self.objects[i]
       

        if self.root_frame.menu_core.IsChecked():


Oh. Wow. I just noticed in the line after it you are clobbering object (the base of all classes), though fortunately in local scope. Don't do that.

Code: [Select]
~/Games/DwarfFortress/df_linux/dfmm
$ grep -n " object =" *.py
decode.py:40:        object = Object(fname, type, root_type, name)
editor.py:109:            object = Object(new_fname, ref_object.type, ref_object.root_type, dialog.GetValue())
editor.py:126:        object = panel.objects[i]
editor.py:142:        object = panel.objects[i]
editor.py:228:        object = self.objects[i]
editor.py:273:        object = self.objects[i]
editor.py:287:        object = self.objects[i]
split.py:203:            object = data['object']
Logged
Git - fast, efficient, distributed version control system
Github - Free public repositories, issue tracking, wikis, downloads...

Rochndil

  • Bay Watcher
  • Mad Modder
    • View Profile
Re: DF Mod Manager [0.5 release]
« Reply #31 on: February 24, 2011, 03:46:54 pm »

Thanks!

This looks really sweet. I'm going to take another crack at my big mod again soon, and this tool should be VERY helpful in doing so. I don't yet have any bug reports or suggestions, but rest assured that if/when I do, I'll be sure to let you know.

Rochndil, the cyclic DF modder...
Logged
Build an Elf a fire, keep him warm for a day.
Drown an Elf in magma, keep him warm for the rest of his life!

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: DF Mod Manager [0.5 release]
« Reply #32 on: February 24, 2011, 06:41:00 pm »

This looks pretty useful.  Probably going to streamline moving mods to new versions.

Does this recognize modded files not in the raw directory?  Such as custom speech files in data/speech?
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

Valdemar

  • Bay Watcher
    • View Profile
Re: DF Mod Manager [0.5 release]
« Reply #33 on: February 26, 2011, 07:12:41 pm »

Finally, a bug report for you (found it 30 seconds in): on line 227 of editor.py, you are not checking the bounds of a tuple before getting the first selection. This causes a pop-up error box, followed by a crash, upon using Save & Exit or Exit without saving, or using the close button in the title bar.
What exactly are you doing to trigger this? I can't reproduce it; wherever I click an object is selected and there's no problem. And "Exit Without Saving" never calls listbox_clicked(). Regardless, I'll put in a check for next time.

Does this recognize modded files not in the raw directory?  Such as custom speech files in data/speech?
No, I didn't realize there were moddable files in the data directory. I may add those eventually.

Artanis00

  • Bay Watcher
    • View Profile
Re: DF Mod Manager [0.5 release]
« Reply #34 on: February 26, 2011, 08:27:45 pm »

Finally, a bug report for you (found it 30 seconds in): on line 227 of editor.py, you are not checking the bounds of a tuple before getting the first selection. This causes a pop-up error box, followed by a crash, upon using Save & Exit or Exit without saving, or using the close button in the title bar.
What exactly are you doing to trigger this? I can't reproduce it; wherever I click an object is selected and there's no problem. And "Exit Without Saving" never calls listbox_clicked(). Regardless, I'll put in a check for next time.

Running Python 2.6.6 on Ubuntu 10.10:
  • Starting from an vanilla install, installed DFMM and had it do it's thing for core.
  • Made a new mod
  • Opened mod for editing.
  • Selected Save & Close, Close without Saving, or used the close button on window decoration.

Right now I've got the problematic line wrapped in a try block and just dump the click handler if the line fails. I also have it printing event in the except block, and when I trigger it I get 18 fails. Since none of these are None, I'm pretty sure the manual calls to listbox_clicked() aren't the issue. Something is firing off 18 real click events right after ModEditorFrame.exit().
Logged
Git - fast, efficient, distributed version control system
Github - Free public repositories, issue tracking, wikis, downloads...

Askot Bokbondeler

  • Bay Watcher
  • please line up orderly
    • View Profile
Re: DF Mod Manager [0.5 release]
« Reply #35 on: February 27, 2011, 05:24:45 pm »

can i ask for a keyboard shortcut to delete entries in the raws? either ctl+something or simply the delete key

Rochndil

  • Bay Watcher
  • Mad Modder
    • View Profile
Re: DF Mod Manager [0.5 release]
« Reply #36 on: February 27, 2011, 06:59:24 pm »

Good evening.

I finally got all my DF files put away, and gave DMM a spin. So far, no real problems, but one comment. It doesn't seem to be able to handle stuff in the /graphics folder (or subfolders). Since a lot of the larger mods include graphics, this is definitely something to give some thought to for the future. As anything else comes up, I'll be sure to let you know.

Rochndil, who has taxes to work on...bleh.
Logged
Build an Elf a fire, keep him warm for a day.
Drown an Elf in magma, keep him warm for the rest of his life!

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DF Mod Manager [0.5 release]
« Reply #37 on: March 06, 2011, 04:53:21 pm »

Can the program parse bodyglosses? At the moment they're in with the UPPERBODY_PINCERS entry by default, so I've made a null body part to get them in a category of their own.

Also requesting some way of displaying whether any changes have been made to mods since the last save. Often I save the mod and go straight to opening DF, and it can be really frustrating to not realise immediately why a change hasn't taken effect.

And also requesting a search function. That's the only thing stopping me from abandoning Notepad entirely.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

rephikul

  • Bay Watcher
  • [CURIOUSBEAST_IDEA]
    • View Profile
Re: DF Mod Manager [0.5 release]
« Reply #38 on: March 06, 2011, 10:04:08 pm »

I have a feature suggestion: raw comparer by objects. Right now I'm using examdiff to check for new features but that program doesnt understand DF's raw architect and might cause some strange comparison if let's say the list in my file is creature:elf, creature:human, creature:dwarf instead of creature:dwarf, creature:elf, creature:human. I'm looking for a program that recognize different objects and compare raw of objects of the same name and point out the difference in those objects and the difference in the existence of objects.

Spoiler: working example (click to show/hide)
Logged
Intensifying Mod v0.23 for 0.31.25. Paper tigers are white.
Prepacked Dwarf Fortress with Intensifying mod v.0.23, Phoebus graphics set, DFhack, Dwarf Therapist, Runesmith and a specialized custom worldgen param.

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DF Mod Manager [0.5 release]
« Reply #39 on: March 08, 2011, 03:42:43 pm »

I found some sort of bug, though I can't figure out how to reproduce it.

I was saving with Ctrl-S and fat-fingered something, at which point a message popped up briefly and the program crashed. When I restarted and went back to the mod I was working on, all the changed entries had been retained but all the new ones were gone.

All I managed to catch of the error box was 'encountered character...' and either #288 or #388.

Sorry it's a little vague, but this was a particularly nasty surprise. Does the universe not want me to do this mod or something? :/

Edit: another crash after restoring the mod from the objects folder and attempting to reinstall it. (see bottom of post) This isn't the same one as it didn't delete things.

Code: [Select]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 1551-1554: character maps to <undefined>

  File "dfmm.py", line 465, in install
  File "encode.pyc", line 19, in encode_objects
  File "encode.pyc", line 7, in encode_objects
  File "encodings\cp437.pyc", line 12, in encode

There isn't anything in the relevant creature file that looks out of the ordinary, just regular text. I'm going to delete bits of the area I was working on and see if I can get rid of the problem.

Edit: Right, let's get this reported properly. Reimporting the objects folder with the last installed version of the mod before the crash does work. Anything involving the .dfmod file that crashed does not. Attempting to install it does not redelete anything added after the crash, but it does delete enough of the raws to result in a 265KB error file upon selecting arena mode.
« Last Edit: March 08, 2011, 04:36:26 pm by Sutremaine »
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Valdemar

  • Bay Watcher
    • View Profile
Re: DF Mod Manager [0.5 release]
« Reply #40 on: March 10, 2011, 04:02:32 pm »

Edit: Right, let's get this reported properly. Reimporting the objects folder with the last installed version of the mod before the crash does work. Anything involving the .dfmod file that crashed does not. Attempting to install it does not redelete anything added after the crash, but it does delete enough of the raws to result in a 265KB error file upon selecting arena mode.
Sounds like a character encoding issue. DFMM assumes everything is in CP437, DF's format. Can you upload the bugged .dfmod file somewhere so I can take a look at it?

I have a feature suggestion: raw comparer by objects. Right now I'm using examdiff to check for new features but that program doesnt understand DF's raw architect and might cause some strange comparison if let's say the list in my file is creature:elf, creature:human, creature:dwarf instead of creature:dwarf, creature:elf, creature:human. I'm looking for a program that recognize different objects and compare raw of objects of the same name and point out the difference in those objects and the difference in the existence of objects.

DFMM already does something very similar to this with the change highlighting and core data viewing functions of the editor. Is it specifically the two-column format you're looking for?

Can the program parse bodyglosses? At the moment they're in with the UPPERBODY_PINCERS entry by default, so I've made a null body part to get them in a category of their own.

Hmm, I didn't realize that there were two kinds of objects in the body type file. I'll see what I can do about that, though it will require a significant rewrite of the parse engine.


Also requesting some way of displaying whether any changes have been made to mods since the last save. Often I save the mod and go straight to opening DF, and it can be really frustrating to not realise immediately why a change hasn't taken effect.

And also requesting a search function. That's the only thing stopping me from abandoning Notepad entirely.

can i ask for a keyboard shortcut to delete entries in the raws? either ctl+something or simply the delete key

These will all be in the next version, which should be ready in the next few days.

Here's a preview of the new main interface in the new version:
Spoiler (click to show/hide)

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DF Mod Manager [0.5 release]
« Reply #41 on: March 10, 2011, 05:04:14 pm »

Sounds like a character encoding issue. DFMM assumes everything is in CP437, DF's format. Can you upload the bugged .dfmod file somewhere so I can take a look at it?
No, I deleted it. I was able to get the mod manager to do the crash-and-delete again (by pressing Ctrl s - in a new entry), but the resulting .dfmod file is more stable and doesn't cause any more crashes or massive errorlogs, and it references different files in the error message. This time it's deleting all modifications and keeping added entries.

Error message:
Code: [Select]
UnicodeEncodeError: 'charmap' codec can't encode character u'\xad' in position 148: character maps to <undefined>

File "editor.pyc", line 154, in save
File "encode.pyc", line 59, in encode_mod
File "encodings\cp437.pyc", line 12, in encode

File can be found here:
http://www.mediafire.com/?cuy9hocqa9ob2c1
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Askot Bokbondeler

  • Bay Watcher
  • please line up orderly
    • View Profile
Re: DF Mod Manager [0.5 release]
« Reply #42 on: March 10, 2011, 05:10:20 pm »

also, a feature request that might be a little too much... you know creature variations and material templates, etc? i mean objects that are defined in their own  raw entries, it'd be awesome if you could make it so these would hiperlink to their raw entries when used as tokens, and possibly display red when the link was broken, and in the raw entries of these defined objects one could select an option in the menu to search and display every entry referring to that object

eh... i don't program, so i don't know how hard or feasible it is to do this, so excuse me if i'm asking to much X)

EDIT:also, color coding tokens! you'd click a button and it'd give you a prompt where you could type a token, like [CLUSTER_NUMBER:#:#] and select a color, and every occurrence of said token would be colored with that color
« Last Edit: March 10, 2011, 05:16:45 pm by Askot Bokbondeler »
Logged

rynait

  • Bay Watcher
    • View Profile
Re: DF Mod Manager [0.5 release]
« Reply #43 on: March 16, 2011, 03:49:33 pm »

Hello,

i tried running this utility dfmm and not sure how to get this done correctly.

I made a mod onto Deon's genesis mod and kept the file (which includes the .18, genesis and mine).   I saw this nifty utility and downloaded etc...

I re-made vanilla DF (.18), which i ran the dfmm (to create core), then run import from directory with deon's genesis (original .18e). then run import from directory again, with new name; 'my mod' (has genesis mods).  I wanted to seperate my mod entries from genesis mod; then right clicked (on "my mod") for metamod (new name entry my mod: genesis). the process was very quick and shows no changes or difference (I also clicked on edit on the "my mod: genesis", is blank).

so clearly I must have misunderstood the instructions.  Can anyone clarify the instruction.

Thank you,
rynait
Logged

Valdemar

  • Bay Watcher
    • View Profile
Re: DF Mod Manager [0.5 release]
« Reply #44 on: March 16, 2011, 08:01:40 pm »

Hello,

i tried running this utility dfmm and not sure how to get this done correctly.

I made a mod onto Deon's genesis mod and kept the file (which includes the .18, genesis and mine).   I saw this nifty utility and downloaded etc...

I re-made vanilla DF (.18), which i ran the dfmm (to create core), then run import from directory with deon's genesis (original .18e). then run import from directory again, with new name; 'my mod' (has genesis mods).  I wanted to seperate my mod entries from genesis mod; then right clicked (on "my mod") for metamod (new name entry my mod: genesis). the process was very quick and shows no changes or difference (I also clicked on edit on the "my mod: genesis", is blank).

so clearly I must have misunderstood the instructions.  Can anyone clarify the instruction.

Thank you,
rynait

DFMM does not currently have the ability to create a metamod by inspecting the difference between two existing mods, which is what you seem to need. When you create a metamod, it starts out empty, and you are intended to fill in changes in the editor.

I will add this feature to the next version with an "Import Metamod" command in the mod menu.
Pages: 1 2 [3] 4 5 ... 9