Bay 12 Games Forum

Please login or register.

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

Author Topic: JDwarf  (Read 18950 times)

avtolik

  • Bay Watcher
    • View Profile
JDwarf
« on: May 31, 2012, 05:00:13 pm »

-= new version 0.2 works with the Steam version of the game =-

Hi all,

JDwarf is a simple utility to view and modify the skills of your dwarfs in fortress mode.
There are a couple of other features like enable/disable labors and importing and exporting work details.
JDwarf is inspired by Runesmith and DwarfTherapist.
 

Screenshot, video:
Spoiler (click to show/hide)

-= Requirements =-
  • Java 17+
  • latest DFHack
  • Windows, Linux may be unstable

-= Installation =-

Download the zip file
 http://dffd.bay12games.com/file.php?id=6403
  • Extract the files somewhere
  • Copy JDwarf.lua to the [main DF directory]/hack/scripts. Overwrite if exists.
  • Run the program by running Jdwarf.bat or double clicking on the jar file (DF must be running already)

-= Usage hints =-
  • Because they are too many skills to see them in one window clearly, they are grouped in different categories. To switch between the categories, hit the "Next Columns" button
  • When you make any change - for example increasing a skill, or enabling a labor, a "change" is created. You can see every change in the "changes list". When you're ready, you can commit the all changes in the list by clicking the "Commit changes" button.
  • Double right click on a skill to enable/disable the related labor (ex. mining skill obviously enables the mining labor).
  • Double click on a change in the "changes list" to discard it.

-= Other =-
JDwarf - in the Java programming language things are commonly named with "J" in front :)

Changelist
Spoiler (click to show/hide)
« Last Edit: January 23, 2023, 10:16:23 am by avtolik »
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: JDwarf
« Reply #1 on: May 31, 2012, 05:04:28 pm »

add in a creature tag edittor, ghost remover (not just a kill function for them, whatever that makes them think they are slabbed or buried properly)
or better yet something to disable ghosts (I believe this is out of everyones hands, so I understand this may be impossible)

and the ability to "force" labors on any creature, not just controlled creatures "Catch them fish kitty"

Do either one of those and I'm sold
Logged

avtolik

  • Bay Watcher
    • View Profile
Re: JDwarf
« Reply #2 on: May 31, 2012, 05:23:53 pm »

...

Hah my plans are not so grand for now. My motivation comes from the things that bug me currently. Like the lack of a working Runesmith.

But we'll see how it goes.
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: JDwarf
« Reply #3 on: May 31, 2012, 05:29:24 pm »

yes I was saddened by the non-updated RS. Thats why I requested those options haha, I enjoyed being able to make a creature a resident or batshit crazy on a whim. But now with how modding is progressing, Pokemon mods, heck mine could use a way to set labors on pets and have them work.

With that good luck fine sir
Logged

caddybear

  • Bay Watcher
  • Elf Supporter
    • View Profile
Re: JDwarf
« Reply #4 on: May 31, 2012, 06:01:49 pm »

Hi! Good work! I'm sure this will progress along nicely as long as you don't disappear from the face of this bay.
Logged
And then did ARMOK say, the east is the holiest of directions, and thou shouldst not stand there lest thou be strucketh down by my holiest of beards. And then did the dorfs did say, we shall build from the west, for more do we fear the beard of ARMOK than the strike of the elephant.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: JDwarf
« Reply #5 on: May 31, 2012, 07:18:30 pm »

I don't see why this shouldn't work just fine on Linux - after all, the DFHack API is designed to be cross-platform.

When I run it on my Ubuntu VM, it gets the dwarf list just fine, populates all of their skill levels, and even allows me to edit them and queue changes, but when I try to Commit Changes it fails:
Code: [Select]
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:411)
at avtolik.net.JDwarf.DFHClient.getBinding(DFHClient.java:142)
at avtolik.net.JDwarf.DFHClient.setSkillRCPMine(DFHClient.java:342)
at avtolik.net.JDwarf.MainWindow$SubmitChangesAction.actionPerformed(MainWindow.java:303)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
at java.awt.Component.processMouseEvent(Component.java:6203)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:5968)
at java.awt.Container.processEvent(Container.java:2105)
at java.awt.Component.dispatchEventImpl(Component.java:4564)
at java.awt.Container.dispatchEventImpl(Container.java:2163)
at java.awt.Component.dispatchEvent(Component.java:4390)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4125)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
at java.awt.Container.dispatchEventImpl(Container.java:2149)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4390)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:649)
at java.awt.EventQueue.access$000(EventQueue.java:96)
at java.awt.EventQueue$1.run(EventQueue.java:608)
at java.awt.EventQueue$1.run(EventQueue.java:606)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
at java.awt.EventQueue$2.run(EventQueue.java:622)
at java.awt.EventQueue$2.run(EventQueue.java:620)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:619)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

avtolik

  • Bay Watcher
    • View Profile
Re: JDwarf
« Reply #6 on: June 01, 2012, 12:06:08 am »

I don't see why this shouldn't work just fine on Linux - after all, the DFHack API is designed to be cross-platform.

The situation is like this. I wanted to use the DFHacks's protobuf RPC. But I can only get the data, and not modify it (ex. set the skills) with the RPC.
So under Windows I use DFHack's Dfusion/lua to set the skills.
And under Linux there is no Dfusion in the DFHack installation.

In the exception you posted I'm trying to call "setSkillRCPMine" which as it says calls my modified DFHack. Because I use Linux too :)
So I'll have to beautify my changes and get it to peterix to merge it (I hope).
Logged

ThtblovesDF

  • Bay Watcher
    • View Profile
Re: JDwarf
« Reply #7 on: June 01, 2012, 03:20:53 am »

I'd love to have a liquid that causes randrom skill changes (up & down), as well as size/ability changes... do that : P
Logged

avtolik

  • Bay Watcher
    • View Profile
Re: JDwarf
« Reply #8 on: June 01, 2012, 04:42:29 am »

Oooh my mistake, you can run lua scripts under linux too, just not with the lua command. I'll try to put up a linux version today.
Logged

avtolik

  • Bay Watcher
    • View Profile
Re: JDwarf
« Reply #9 on: June 01, 2012, 05:00:29 pm »

New version up.

Version 0.0.6:
- Probably works under Linux
- Button to switch different types of skills for less clutter
Sadly I won't have a linux machine for the next couple of days, so the Linux support is not tested properly.

Remember to copy the lua file in [main DF directory]/hack/scripts.

In the next version I'll try to add enable/disable Labors.
Logged

Xantalos

  • Bay Watcher
  • Your Friendly Salvation
    • View Profile
Re: JDwarf
« Reply #10 on: June 01, 2012, 09:52:03 pm »

This looks cool.
Logged
Sig! Onol
Quote from: BFEL
XANTALOS, THE KARATEBOMINATION
Quote from: Toaster
((The Xantalos Die: [1, 1, 1, 6, 6, 6]))

Reudh

  • Bay Watcher
  • Perge scelus mihi diem perficias.
    • View Profile
Re: JDwarf
« Reply #11 on: June 01, 2012, 10:03:16 pm »

Post to watch, this looks great. With the demise of Runesmith I can see this becoming widely used.

Zanzetkuken The Great

  • Bay Watcher
  • The Wizard Dragon
    • View Profile
Re: JDwarf
« Reply #12 on: June 02, 2012, 03:29:22 pm »

This will be useful.  I hope dial-up can get this utility...
Logged
Quote from: Eric Blank
It's Zanzetkuken The Great. He's a goddamn wizard-dragon. He will make it so, and it will forever be.
Quote from: 2016 Election IRC
<DozebomLolumzalis> you filthy god-damn ninja wizard dragon

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: JDwarf
« Reply #13 on: June 02, 2012, 04:30:57 pm »

IM sure it could, I don't think it's that large... haha I remember days where i'd leave to computer on all night just to download something. Btw try getting a DL manager like FDM some downloads allow resume, so you can download a bit here, then a few hours later start again.
Logged

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: JDwarf
« Reply #14 on: June 02, 2012, 06:07:32 pm »

Removing ghosts is easy. Just give dwarves cannot_undead.
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.
Pages: [1] 2 3 ... 5