Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Poll

One or the other... vote once for #1 and once for #2.

#1: Put the Alarm Siren in the Military Garrison, it fits and is one buildings less.
#1: Keep the Alarm Siren seperate, I want to have it near my other levers.
#2: I have traded with Gnomes, build Artificer and Weather Control Station.
#2: I have NOT traded with Gnomes, did not have the chance to build their buildings.

Pages: 1 ... 457 458 [459] 460 461 ... 749

Author Topic: ☼MASTERWORK-DF☼ V.3 - New release and old post. This will be locked later.  (Read 1855991 times)

Upuaut

  • Escaped Lunatic
    • View Profile
Re: ☼MASTERWORK☼ DF2 - Alpha
« Reply #6870 on: September 16, 2012, 03:40:53 am »

Hello Meph,
Thx for all the work you and your team does.
I downloaded the MDF2-file, but there doesn´t seem to be any setting executable. Is this correct?
Logged

Virlomi

  • Bay Watcher
    • View Profile
Re: ☼MASTERWORK☼ DF2 - Alpha
« Reply #6871 on: September 16, 2012, 03:43:34 am »

This sounds absolutely awesome... unfortunately, when I play I have no sound. It's turned on, and set to 255 volume. No sound, no music, nothing.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: ☼MASTERWORK☼ DF2 - Alpha
« Reply #6872 on: September 16, 2012, 04:01:04 am »

The background music is not included to keep the filesize down. You can get custom background music at the first post, under Sound, or use soundsense. The original game only has a 5min background music loop anyway, nothing more.

The python setting is currently not self-executable, you will need python http://www.python.org/getit/ to run it. It works, but does look very unsorted. But you can toggle every single creature, inorganic, entity, reaction... all that works :)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Virlomi

  • Bay Watcher
    • View Profile
Re: ☼MASTERWORK☼ DF2 - Alpha
« Reply #6873 on: September 16, 2012, 04:25:06 am »

I have the sound pack provided in OP in the data/sound, and it's renamed to song_game.ogg. Even after waiting 20 minutes there's no sound.
Logged

JosephWongKS

  • Bay Watcher
    • View Profile
Re: ☼MASTERWORK☼ DF2 - Alpha
« Reply #6874 on: September 16, 2012, 04:45:29 am »

The background music is not included to keep the filesize down. You can get custom background music at the first post, under Sound, or use soundsense. The original game only has a 5min background music loop anyway, nothing more.

The python setting is currently not self-executable, you will need python http://www.python.org/getit/ to run it. It works, but does look very unsorted. But you can toggle every single creature, inorganic, entity, reaction... all that works :)

I downloaded Python 2.7.3 and opened the MasterworkDF Settings.py file with it, but when I tried to run module I got the following error message:

Traceback (most recent call last):
  File "C:\Users\user\Downloads\MDF2\MasterworkDF Settings.py", line 1, in -toplevel-
    from tkinter import *
ImportError: No module named tkinter
>>>


Could you let me how what I need to run the executable?  Thanks!


EDIT:  With Python 3.2.3 I get a different error message:

Traceback (most recent call last):
  File "C:\Users\user\Downloads\MDF2\MasterworkDF Settings.py", line 110, in <module>
    dd.append([d[-1][0], d[-1][1], len(totdat[j]), d[-1][2]])
IndexError: list index out of range
>>>
« Last Edit: September 16, 2012, 04:59:19 am by JosephWongKS »
Logged

Shingy

  • Bay Watcher
    • View Profile
Re: ☼MASTERWORK☼ DF2 - Alpha
« Reply #6875 on: September 16, 2012, 06:01:26 am »

Ah, perfect, the alpha is out!
Thanks Meph, I'll do some bug and feature testing!

EDIT: I've got the same problem as JosephWongKS. I don't know Python, so I'm not sure where is the problem.
Well, I'll try without configuration then.
« Last Edit: September 16, 2012, 06:11:53 am by Shingy »
Logged

zenerbufen

  • Bay Watcher
    • View Profile
Re: ☼MASTERWORK☼ DF2 - Alpha
« Reply #6876 on: September 16, 2012, 11:14:31 am »

Thanks for the bug report guys! I'm working on it now.

arclance

  • Bay Watcher
    • View Profile
Re: ☼MASTERWORK☼ DF2 - Alpha
« Reply #6877 on: September 16, 2012, 11:16:06 am »

I will download it and take a look at the GUI.
The first thing I see is that Meph included the broken version that only works in Windows and has a memory leak.
After I fix that I will look into the error people have been getting.
« Last Edit: September 16, 2012, 01:32:38 pm by arclance »
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

arclance

  • Bay Watcher
    • View Profile
Re: ☼MASTERWORK☼ DF2 - Alpha
« Reply #6878 on: September 16, 2012, 11:28:54 am »

Okay I figured out what the problem is.
Meph included a empty file in the raws which causes this line
Code: [Select]
dd.append([d[-1][0], d[-1][1], len(totdat[j]), d[-1][2]])
to fail because the list d ends up with zero length.
Code: [Select]
['item_weapon\n', '\n', '[OBJECT:ITEM]\n', '\n', '//all weapons have been moved to item_weapon_masterwork.txt because of heavy modding on all of them. ']
0

I will post a fixed version soon.
« Last Edit: September 16, 2012, 01:32:29 pm by arclance »
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

arclance

  • Bay Watcher
    • View Profile
Re: ☼MASTERWORK☼ DF2 - Alpha
« Reply #6879 on: September 16, 2012, 11:35:16 am »

Here is a fixed version that works on operating systems that are not Windows and ignores empty raw files which fixes the bug that was reported earlier.
Code: [Select]
from tkinter import *
import os
import fnmatch
from tkinter import tix
from tkinter import filedialog

dir1 = 'MasterworkDwarfFortress/raw/objects/'
dir2 = 'Dwarf Fortress/raw/objects/'

match = ['creature*','item*','inorganic*','reaction*','plant*','entity*']
files = []
for m in match:
for file in os.listdir(dir1):
if fnmatch.fnmatch(file, m):
files.append(file)

totdat = [[]]*len(files)
for i in range(len(files)):
f = open(dir1+files[i], mode="rt", buffering=1, encoding="ISO-8859-1")
dat = []
for row in f:
dat.append(row)
totdat[i] = dat
f.close()

ddtot = [[]]*len(totdat)
for j in range(len(totdat)):
d = []
for i in range(len(totdat[j])):
par = totdat[j][i].partition(':')[0]
if (par == '[CREATURE') or (par == '!!!CREATURE'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[REACTION') or (par == '!!!REACTION'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[INORGANIC') or (par == '!!!INORGANIC'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[PLANT') or (par == '!!!PLANT'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[ITEM_AMMO') or (par == '!!!ITEM_AMMO'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[ITEM_ARMOR') or (par == '!!!ITEM_ARMOR'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[ITEM_FOOD') or (par == '!!!ITEM_FOOD'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[ITEM_GLOVES') or (par == '!!!ITEM_GLOVES'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[ITEM_HELM') or (par == '!!!ITEM_HELM'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[ITEM_INSTRUMENT') or (par == '!!!ITEM_INSTRUMENT'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[ITEM_PANTS') or (par == '!!!ITEM_PANTS'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[ITEM_SHIELD') or (par == '!!!ITEM_SHIELD'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[ITEM_SHOES') or (par == '!!!ITEM_SHOES'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[ITEM_SIEGEAMMO') or (par == '!!!ITEM_SIEGEAMMO'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[ITEM_TOOL') or (par == '!!!ITEM_TOOL'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[ITEM_TOY') or (par == '!!!ITEM_TOY'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[ITEM_TRAPCOMP') or (par == '!!!ITEM_TRAPCOMP'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
elif (par == '[ITEM_WEAPON') or (par == '!!!ITEM_WEAPON'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!1') != 0:
d[-1][2] = 'off'
elif (par == '[ENTITY') or (par == '!!!ENTITY'):
d.append([totdat[j][i].partition(':')[2].partition(']')[0], i, 'on'])
if par.count('!!!') != 0:
d[-1][2] = 'off'
if len(d) != 0:
dd = []
for i in range(len(d)-1):
dd.append([d[i][0], d[i][1], d[i+1][1], d[i][2]])
dd.append([d[-1][0], d[-1][1], len(totdat[j]), d[-1][2]])
ddtot[j] = dd

if os.path.exists('configuration.txt'):
pass
else:
for i in range(len(files)):
A = files[i].partition('_')[0]
B = files[i].partition('_')[2].partition('.')[0]
for j in range(len(ddtot[i])):
C = ddtot[i][j][0]
ddtot[i][j][0] = A+'.'+B+'.'+C

def save():
fn = filedialog.asksaveasfilename()
wf = open(fn, 'w')
for i in range(len(ddtot)):
for j in range(len(ddtot[i])):
wf.write(ddtot[i][j][0]+'#'+ddtot[i][j][3]+'\n')
wf.close()

def load():
fn = filedialog.askopenfilename()
wf = open(fn)
dat = []
for row in wf:
dat.append(row)
wf.close()
for i in range(len(dat)):
for j in range(len(ddtot)):
for k in range(len(ddtot[j])):
if dat[i].partition('#')[0] == ddtot[j][k][0]:
ddtot[j][k][3] = dat[i].partition('#')[2].partition('\n')[0]

def write():
for i in range(len(files)):
wf = open(dir2 + files[i], 'w')
for k in range(ddtot[i][0][1]):
wf.write(totdat[i][k])
for j in range(len(ddtot[i])):
for z in range(ddtot[i][j][1],ddtot[i][j][2]):
if ddtot[i][j][3] == 'off':
wf.write(totdat[i][z].replace('[','!!!'))
elif ddtot[i][j][3] == 'on':
wf.write(totdat[i][z].replace('!!!','['))
wf.close()

if __name__ == '__main__':
root = tix.Tk()

canvas = tix.Canvas(root, width = 500, height=500)
canvas.grid(row=0, column=0, sticky=N+S+E+W)
root.grid_rowconfigure(0,weight=1)
frame = tix.Frame(canvas)
frame.rowconfigure(1,weight=1)
frame.columnconfigure(1,weight=1)

class states:

def __init__(self,ty):
self.t =Toplevel(root)
self.ty = ty
self.top = []
self.ord = []
self.sub = []
self.tot =  []
self.base = []
self.makelist()
cls = tix.Button(self.t, text='Close', command=self.close)
cls.grid()

def close(self):
self.t.destroy()

def update(self,item):
if len(item.split('.')) == 2:
for i in range(len(ddtot)):
for j in range(len(ddtot[i])):
val = ddtot[i][j][0].split('.')[0]+'.'+ddtot[i][j][0].split('.')[1]
if val == item:
if self.cl.getstatus(item) == 'off':
self.cl.setstatus(ddtot[i][j][0], 'off')
ddtot[i][j][3] = 'off'
elif self.cl.getstatus(item) == 'on':
self.cl.setstatus(ddtot[i][j][0], 'on')
ddtot[i][j][3] = 'on'
elif len(item.split('.')) == 3:
for i in range(len(ddtot)):
for j in range(len(ddtot[i])):
if item == ddtot[i][j][0]:
ddtot[i][j][3] = self.cl.getstatus(item)

def update2(self,item):
if len(item.split('.')) == 2:
meti = item.partition('.')[2]
for i in range(len(self.ord)):
if self.ord[i].count(meti) != 0:
for j in range(len(self.sub)):
if (self.ord[i][1] == self.sub[j][0]) and (self.ord[i][0] == item.partition('.')[0]):
temp = self.ord[i][0]+'.'+self.ord[i][1]+'.'+self.sub[j][1]
if self.cl.getstatus(item) == 'off':
self.cl.setstatus(temp, 'off')
elif self.cl.getstatus(item) == 'on':
self.cl.setstatus(temp, 'on')
for k in range(len(ddtot)):
for l in range(len(ddtot[k])):
if ddtot[k][l][0] == temp:
ddtot[k][l][3] = self.cl.getstatus(temp)
elif len(item.split('.')) == 3:
for i in range(len(ddtot)):
for j in range(len(ddtot[i])):
if item == ddtot[i][j][0]:
ddtot[i][j][3] = self.cl.getstatus(item)

def makelist(self):
if os.path.exists('configuration.txt'):
self.cl = tix.CheckList(self.t, width=500, height=400, browsecmd=self.update2)
self.cl.grid()
f = open('configuration.txt')
conf = []
for row in f:
conf.append(row)
f.close()
for i in range(len(conf)):
if conf[i].partition(' ')[0] == 'BASE':
self.base.append([conf[i].partition(' ')[2], i, 0])
for i in range(len(self.base)-1):
self.base[i][2] = self.base[i+1][1]
self.base[-1][2] = len(conf)
for vl in self.base:
if vl[0].partition('\n')[0] == self.ty.upper():
for val in conf[vl[1]:vl[2]]:
if val.partition(' ')[0] == 'TOP':
self.top.append(val.partition(' ')[2].partition('\n')[0])
self.cl.hlist.add(self.top[-1], text=self.top[-1])
if val.partition(' ')[0] == 'ORD':
self.ord.append([self.top[-1], val.partition(' ')[2].partition('\n')[0]])
self.cl.hlist.add(self.top[-1]+'.'+self.ord[-1][1], text=self.ord[-1][1])
self.cl.setstatus(self.top[-1]+'.'+self.ord[-1][1], 'on')
if val.partition(' ')[0] == 'SUB':
self.sub.append([self.ord[-1][1],val.partition(' ')[2].partition('\n')[0]])
self.cl.hlist.add(self.ord[-1][0]+'.'+self.ord[-1][1]+'.'+self.sub[-1][1], text=self.sub[-1][1])
self.tot.append(self.ord[-1][0]+'.'+self.ord[-1][1]+'.'+self.sub[-1][1])
self.cl.autosetmode()
for i in range(len(ddtot)):
for j in range(len(ddtot[i])):
for k in range(len(self.sub)):
if self.sub[k][1] == ddtot[i][j][0]:
ddtot[i][j][0] = self.tot[k]
self.cl.setstatus(ddtot[i][j][0], ddtot[i][j][3])
elif ddtot[i][j][0] == self.tot[k]:
self.cl.setstatus(ddtot[i][j][0], ddtot[i][j][3])
else:
self.cl = tix.CheckList(self.t, width=500, height=400, browsecmd=self.update)
self.cl.grid()
self.cl.hlist.add(self.ty, text=self.ty + 's')
for i in range(len(files)):
if files[i].partition('_')[0] == self.ty:
self.top.append([files[i].partition('_')[0],files[i].partition('_')[2].partition('.')[0]])
self.cl.hlist.add(self.top[-1][0] +'.'+ self.top[-1][1], text=self.top[-1][1])
self.cl.setstatus(self.top[-1][0] +'.'+ self.top[-1][1], "on")
for j in range(len(ddtot[i])):
if ddtot[i][j][0].partition('.')[0] == self.top[-1][0]:
self.cl.hlist.add(ddtot[i][j][0], text=ddtot[i][j][0].partition('.')[2].partition('.')[2])
else:
self.sub.append(ddtot[i][j][0])
self.cl.hlist.add(self.top[-1][0] +'.'+ self.top[-1][1] + '.' + self.sub[-1], text=ddtot[i][j][0])
ddtot[i][j][0] = self.top[-1][0] +'.'+ self.top[-1][1] + '.' + self.sub[-1]
self.cl.setstatus(ddtot[i][j][0], ddtot[i][j][3])
self.cl.autosetmode()

canvas.create_window(0,0,anchor=NW,window=frame)
frame.update_idletasks()
canvas.config(scrollregion=canvas.bbox('all'))

def creatures():
states('creature')
def items():
states('item')
def reactions():
states('reaction')
def entities():
states('entity')
def inorganics():
states('inorganic')
def plants():
states('plant')

########################################################################
if os.path.exists('metatags.txt'):

def func(q):
if textvar[q].get() == txt[q] + ' Off':
for i in range(len(ddtot)):
for j in range(len(ddtot[i])):
for k in range(ddtot[i][j][1],ddtot[i][j][2]):
totdat[i][k] = totdat[i][k].replace('NO'+tag[q]+'![','NO'+tag[q]+'!!')
totdat[i][k] = totdat[i][k].replace('YES'+tag[q]+'!!','YES'+tag[q]+'![')
textvar[q].set(txt[q] + ' On')
elif textvar[q].get() == txt[q] + ' On':
for i in range(len(ddtot)):
for j in range(len(ddtot[i])):
for k in range(ddtot[i][j][1],ddtot[i][j][2]):
totdat[i][k] = totdat[i][k].replace('NO'+tag[q]+'!!','NO'+tag[q]+'![')
totdat[i][k] = totdat[i][k].replace('YES'+tag[q]+'![','YES'+tag[q]+'!!')
textvar[q].set(txt[q] + ' Off')

f = open('metatags.txt')
tags = []
txt = []
tag = []
textvar = []
b = []
z = 0
for row in f:
tags.append(row)
f.close()
for val in tags:
txt.append(val.partition('/')[2].partition('\n')[0])
tag.append(val.partition('/')[0])
textvar.append(StringVar())
textvar[z].set(txt[z] + ' On')
b.append(tix.Button(frame, textvariable=textvar[z], command=lambda z=z:func(z)))
b[z].grid()
z = z + 1

########################################################################

b1 = tix.Button(frame, text='Creatures', command=creatures)
b2 = tix.Button(frame, text='Reactions', command=reactions)
b3 = tix.Button(frame, text='Entities', command=entities)
b4 = tix.Button(frame, text='Items', command=items)
b5 = tix.Button(frame, text='Plants', command=plants)
b6 = tix.Button(frame, text='Inorganics', command=inorganics)
b7 = tix.Button(frame, text='Load', command=load)
b8 = tix.Button(frame, text='Save', command=save)
b9 = tix.Button(frame, text='Write', command=write)
b1.grid()
b2.grid()
b3.grid()
b4.grid()
b5.grid()
b6.grid()
b7.grid()
b8.grid()
b9.grid()
root.update()
root.mainloop()
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

zenerbufen

  • Bay Watcher
    • View Profile
Re: ☼MASTERWORK☼ DF2 - Alpha
« Reply #6880 on: September 16, 2012, 11:44:10 am »

Apparently by I'm working on it now I meant, hang tight arc will post a fix before I finish my breakfast.   ;D

Firehawk45

  • Bay Watcher
    • View Profile
Re: ☼MASTERWORK☼ DF2 - Alpha
« Reply #6881 on: September 16, 2012, 11:49:26 am »

you could race each other to a working version, and the one who beats the other can ask Meph to be a creature in the mod :D
Logged

arclance

  • Bay Watcher
    • View Profile
Re: ☼MASTERWORK☼ DF2 - Alpha
« Reply #6882 on: September 16, 2012, 12:02:40 pm »

Apparently by I'm working on it now I meant, hang tight arc will post a fix before I finish my breakfast.   ;D
I was already looking at it before you posted so I had a head start.
It was easier to figure out than I though it would be since someone else wrote the code.

@ Meph
Do you want me to upload a new archive with the fixed version of the GUI since you are stuck in the Internet Stone Age?
« Last Edit: September 16, 2012, 01:31:28 pm by arclance »
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

Shingy

  • Bay Watcher
    • View Profile
Re: ☼MASTERWORK☼ DF2 - Alpha
« Reply #6883 on: September 16, 2012, 04:30:01 pm »

Thanks for the fix arclance!
Didn't have the time to play, so I'll try now.
I noticed that there are less customisation options. What happened to the fortress defense races? Didn't you implement them yet?
Oh, by the way, it's funny, last time I played, I modded anubites for myself, and now they are in 2.0 . May I suggest you a weapon? The khopesh. I have the raws if you want to.
It's a very good slashing weapon, but it doesn't penetrate deeply. And if you try to stab, it's useless.
Logged

arclance

  • Bay Watcher
    • View Profile
Re: ☼MASTERWORK☼ DF2 - Alpha
« Reply #6884 on: September 16, 2012, 04:35:54 pm »

^ Your welcome.
It does not look like the non-masterwork options are in there right now.
Maybe Meph can tell you what is coming back and what is not later.
« Last Edit: September 16, 2012, 04:38:45 pm by arclance »
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext
Pages: 1 ... 457 458 [459] 460 461 ... 749