Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 105 106 [107] 108 109 ... 222

Author Topic: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06  (Read 962620 times)

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.25.0 | DF 40.10
« Reply #1590 on: September 16, 2014, 05:18:01 pm »

Yeah, whoops. It's not at all portable, being a general script to prepare the starter pack for uploading. I'll do a general one to run from the DT folder and upload that later today.
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Chimerat

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.25.0 | DF 40.10
« Reply #1591 on: September 16, 2014, 05:29:46 pm »

Yeah, whoops. It's not at all portable, being a general script to prepare the starter pack for uploading. I'll do a general one to run from the DT folder and upload that later today.
Thank you!
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.25.0 | DF 40.10
« Reply #1592 on: September 16, 2014, 06:43:02 pm »

I haven't actually tested this, but it should work.  No idea if my attempt at making it cross-platform will work either, but if the folder structure is the same it should be OK.  The core works for me though, and that's what I wrote it for...

Requires Python to run python scripts. 

Code: [Select]
from __future__ import print_function
import os
import sys
try:  # Python 2
    from urllib2 import Request
except ImportError:  # Python 3
    from urllib.request import Request

print('A script to download the latest DT memory layouts.')
print('Run from the same folder as the Dwarf Therapist executable.\n')

version = input('What version of DF?  For 40.12, enter "12":\n    ')

if sys.platform().startswith('win32'):
    platform = 'windows'
    memory_layout_file = 'v0.40.' + version + '_graphics.ini'
elif sys.platform().startswith('darwin'):
    platform = 'osx'
    memory_layout_file = 'v0.40.' + version + '_osx.ini'
elif sys.platform().startswith('linux'):
    platform = 'linux'
    memory_layout_file = 'v0.40.' + version + '.ini'
else:
    print('Weird OS, aborting...')
    raise SystemExit

DT_layout_path = 'etc/memory_layouts/'+platform+'/'

if os.path.isfile(DT_layout_path + memory_layout_file):
    print('Therapist memory layout is already in place.')
else:
    url = str('https://raw.githubusercontent.com/splintermind/'
              'Dwarf-Therapist/DF2014/share/memory_layouts/'
              + platform + '/' + memory_layout_file)
    try:
        url_content = urllib.request.urlopen(url).read().decode(encoding='UTF-8')
        with open(DT_layout_path + memory_layout_file, 'w') as f:
            f.write(url_content)
        print('DT memory layout was downloaded OK.')
    except:
        print('DT memory layout unavailable for this version.')
« Last Edit: September 16, 2014, 07:18:54 pm by PeridexisErrant »
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

lethosor

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.25.0 | DF 40.10
« Reply #1593 on: September 16, 2014, 07:08:57 pm »

Quote
if os.system() == 'nt':
...
elif os.system == 'posix':
os.system() executes arbitrary external commands - you're probably looking for sys.platform.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.25.0 | DF 40.10
« Reply #1594 on: September 16, 2014, 07:19:56 pm »

/headdesk - I even looked at that exact page to distinguish between OSX and linux...

Fixed.  Hopefully it works now.
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

lethosor

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.25.0 | DF 40.10
« Reply #1595 on: September 16, 2014, 07:39:05 pm »

sys.platform isn't a function either:
Code: [Select]
from __future__ import print_function
import os
import sys
try:  # Python 2
    from urllib2 import Request
except ImportError:  # Python 3
    from urllib.request import Request

print('A script to download the latest DT memory layouts.')
print('Run from the same folder as the Dwarf Therapist executable.\n')

version = input('What version of DF?  For 40.12, enter "12":\n    ')

if sys.platform.startswith('win32'):
    platform = 'windows'
    memory_layout_file = 'v0.40.' + version + '_graphics.ini'
elif sys.platform.startswith('darwin'):
    platform = 'osx'
    memory_layout_file = 'v0.40.' + version + '_osx.ini'
elif sys.platform.startswith('linux'):
    platform = 'linux'
    memory_layout_file = 'v0.40.' + version + '.ini'
else:
    print('Weird OS, aborting...')
    raise SystemExit

DT_layout_path = 'etc/memory_layouts/'+platform+'/'

if os.path.isfile(DT_layout_path + memory_layout_file):
    print('Therapist memory layout is already in place.')
else:
    url = str('https://raw.githubusercontent.com/splintermind/'
              'Dwarf-Therapist/DF2014/share/memory_layouts/'
              + platform + '/' + memory_layout_file)
    try:
        url_content = urllib.request.urlopen(url).read().decode(encoding='UTF-8')
        with open(DT_layout_path + memory_layout_file, 'w') as f:
            f.write(url_content)
        print('DT memory layout was downloaded OK.')
    except:
        print('DT memory layout unavailable for this version.')
(I haven't tested this either, so I'm not sure if there are any other problems ;) )
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

grody311

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.25.0 | DF 40.10
« Reply #1596 on: September 16, 2014, 10:52:50 pm »

I need help with a filtering script.

I would like to create a filter that lists every Dwarf who has the preference "Likes working outdoors" or "Does not mind being outdoors".

I assume I would create a script using d.has_preference(), but I don't know what to put in the brackets.  How exactly does this function work, and what are the values that I need to use to get my filter working?
Logged

civril

  • Escaped Lunatic
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.25.0 | DF 40.10
« Reply #1597 on: September 17, 2014, 01:29:41 am »

Hello,
I got one stupid question about Dwarf Therapist - is there a chance, that any version of DT works with DF 0.40.11 under Windows? (I saw Linux version for 0.40.12).

I would be happy, if anyone could help me about that :)
Logged

Discord

  • Bay Watcher
  • moved by work of art and natural beauty.
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.25.0 | DF 40.10
« Reply #1598 on: September 17, 2014, 01:36:08 am »

Hello,
I got one stupid question about Dwarf Therapist - is there a chance, that any version of DT works with DF 0.40.11 under Windows? (I saw Linux version for 0.40.12).

I would be happy, if anyone could help me about that :)

Have you tried DF file depot?
I just found .12 there for windows.
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.25.0 | DF 40.10
« Reply #1599 on: September 17, 2014, 01:46:15 am »

Hello,
I got one stupid question about Dwarf Therapist - is there a chance, that any version of DT works with DF 0.40.11 under Windows? (I saw Linux version for 0.40.12).

I would be happy, if anyone could help me about that :)

Download the memory layout for whichever version you want.

https://github.com/splintermind/Dwarf-Therapist/tree/DF2014/share/memory_layouts
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

civril

  • Escaped Lunatic
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.25.0 | DF 40.10
« Reply #1600 on: September 17, 2014, 03:08:55 am »

Have you tried DF file depot?
I just found .12 there for windows.

Download the memory layout for whichever version you want.

https://github.com/splintermind/Dwarf-Therapist/tree/DF2014/share/memory_layouts

You are the greatest of the greatest! The mountains should wear your names! I thought, that it could be simple, but not, that it would be SO simple. This time google wasn't my best friend :)

Thank you from deep of my soul, now I may back to DF after long time of absense and see, what has changed :)
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.25.0 | DF 40.10
« Reply #1601 on: September 17, 2014, 03:16:30 am »

@Splinterz - I'm noticing a theme here.  Maybe it's a good idea to add an explanation and link to memory layouts to the OP, and/or release 25.1 including them?
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

DeDeRon

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.25.0 | DF 40.10
« Reply #1602 on: September 17, 2014, 03:47:00 am »

current git HEAD will not conpile on a linux system without pdflatex installed (complains about pdflatex is missing). removing the pdf doc target from the created Makefile solves the issue. i don't know anthing about qmake to provide a real solution.

splinterz

  • Bay Watcher
    • View Profile
    • Dwarf Therapist Branch
Re: Dwarf Therapist (Maintained Branch) v.25.0 | DF 40.10
« Reply #1603 on: September 17, 2014, 05:42:19 am »

@Splinterz - I'm noticing a theme here.  Maybe it's a good idea to add an explanation and link to memory layouts to the OP, and/or release 25.1 including them?
i'll consider adding a readme. next release is taking a bit more time than expected..

what really needs to be done (and an issue has already been created) is to restore/fix the auto-updating capabilities of DT.

splinterz

  • Bay Watcher
    • View Profile
    • Dwarf Therapist Branch
Re: Dwarf Therapist (Maintained Branch) v.25.0 | DF 40.10
« Reply #1604 on: September 17, 2014, 05:42:51 am »

current git HEAD will not conpile on a linux system without pdflatex installed (complains about pdflatex is missing). removing the pdf doc target from the created Makefile solves the issue. i don't know anthing about qmake to provide a real solution.
should be fixed with that last merge
Pages: 1 ... 105 106 [107] 108 109 ... 222