View Issue Details

IDProjectCategoryView StatusLast Update
0001498Dwarf FortressDwarf Mode -- Jobs, Generalpublic2014-08-13 05:10
ReporterDraco18s Assigned ToToady One  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.31.03 
Fixed in Version0.34.01 
Summary0001498: Crystal glass items can't be made, CRYSTAL_GLASSABLE appears broken
DescriptionOne can not use (imported) raw glass to make windows at the glass furnace.

I have 16 units of imported raw crystal glass and the job cancels "needs glass making rough gems," which seems silly: if you have raw glass you should be able to turn that into any glass object.

The only way to turn raw glass into glass windows is cutting it into gems and making a gem window (using 3 times the material).
Steps To ReproduceImport glass
Use glass furnace to make glass window
Tagsbinary patch

Relationships

has duplicate 0001281 closeduser6 Raw Rock Crystals not recognized for making crystal glass objects 
has duplicate 0000788 resolveduser6 Traded raw clear/crystal glass not appearing at Jeweler's Workshop, although green glass does 
related to 0003408 new Human merchants bring raw clear/crystal glass despite not having access to pearlash 

Activities

Logical2u

2010-04-24 14:14

manager   ~0004920

Since you say this is only occurring with IMPORTED glass, and you're assuming it's also true for non-imported glass, I'm tempted to say this is related to/duplicate of 0000788.

Unless you also have evidence that ALL glass - including non-imported stuff - is broken.

Draco18s

2010-04-24 14:21

reporter   ~0004921

Last edited: 2010-04-24 14:28

No, it appears in the jewelers shop, but I can't use it in the glass furnace.

Also: I can't MAKE MY OWN crystal glass, when I have sand (imported), charcoal, pearlash, and rough rock crystals available. Cancels "needs glass making rough gems," as before.

None. Not a single crystal glass item can be made when all possible raw materials are available (clear and green, yes, not crystal).

http://i44.tinypic.com/120rssn.png

user6

2010-04-25 01:52

  ~0004961

Last edited: 2010-04-25 10:38

"Raw glass" is essentially a rough gem. You can't make furniture out of it. Furniture has to be made directly from sand (or rock crystal). See http://df.magmawiki.com/index.php/40d:Glass#Making_glass_items

In this case, the "glass-making rough gems" refers to rough rock crystal.

Makes sense now?

Draco18s

2010-04-25 14:13

reporter   ~0005036

Footkerchief:
I can't make ANY CRYSTAL GLASS ITEM OUT OF SAND/ROCK CRYSTALS EITHER.

DoctorZuber

2010-04-25 14:51

reporter   ~0005039

Last edited: 2010-04-25 14:53

raw glass is not an ingredient in making glass items.

the ingredients you need for clear glass are sand, and pearlash.

the ingredients you need for crystal glass are pearlash bars, and rock crystal.

Raw glass is used only to make glass gems used for decorating things.

user6

2010-04-25 15:12

  ~0005042

Last edited: 2010-04-25 15:13

I can't make ANY CRYSTAL GLASS ITEM OUT OF SAND/ROCK CRYSTALS EITHER.

Ah, I hadn't read your note. Are you sure the crystals are accessible? Do you still get the problem when the crystals and pearlash are in stockpiles right next to the glass furnace?

Draco18s

2010-04-25 15:35

reporter   ~0005047

Last edited: 2010-04-25 15:36

Yes.

http://i43.tinypic.com/10pqc6p.png

@Dr.Zuber: yeah, got that. Read my notes.

user6

2010-04-25 16:19

  ~0005052

Last edited: 2010-04-26 11:11

Okay, I've retitled the thread to reflect the actual apparent bug.

Has anyone managed to make CRYSTAL glass items?

clamity

2010-04-25 19:09

reporter   ~0005066

I have had no problems making clear glass items, but I haven't tried crystal yet. To note, my glass industry is all local, so I haven't tried with imported sand/pearlash.

FunkyWaltDogg

2010-04-26 11:08

reporter   ~0005150

I have made clear glass windows without any problem, using sand brought on embark and homemade pearlash.

user6

2010-04-26 11:11

  ~0005152

Ack goddamit, I messed up the title and my question. I meant, has anyone managed to make CRYSTAL glass items?

Rafal99

2010-04-26 13:09

reporter   ~0005166

I tried it. My glassmaker brought pearlash to glass furnace then cancelled the task with "needs glass-making rough gems" message. It seems right since I have only cut rock crystals bought from the traders. For crystal glass you need ROUGH rock crystals that you can't buy from traders.

Malicus

2010-04-26 17:05

reporter   ~0005207

I made a new world, embarked somewhere, revealed the map to search for rock crystals, and I somehow found some on the first embark site. I then set about making some pearlash and having my miners get the rough rock crystals. I then tried to make a crystal glass floodgate. The glassmaker grabbed the pearlash, but then he cancelled because he "needs glass-making rough gems". There was a stockpile with ten rough rock crystals right next to the glass furnace. Just to make sure it wasn't some weird pathing problem, I constructed a jeweler's workshop and ordered one of the rock crystals cut, which happened without a hitch. I tried making a crystal glass floodgate again and got the same cancellation message.

I suspect that [CRYSTAL_GLASSABLE] in the raws for rock crystals isn't working quite as it should.

qwints

2010-04-26 19:49

reporter   ~0005241

I've gotten the same message when attempting to make crystal glass with local rock crystal.

bakawolf

2010-05-04 17:56

reporter   ~0006129

i am also unable to make any crystal glass items, with an abundance of rough rock crystals in a stockpile next to the furnace, and pearlash nearby.

Jerkwhistle

2010-05-07 01:47

reporter   ~0006336

I have the same problem. I have 25 units of accessible rock crystals and sand/pearlash, but get the "need glass-making raw gems" message. I checked an old version, and rock crystals had the [GLASS] tag, not [CRYSTAL_GLASSABLE]. I suspect that maybe something didn't get updated in the code, but switching back to the old tag didn't work, and neither did [CRYSTAL] or [CRYSTAL_GLASS] (although I'm not sure I remembered to change the tags in both the save directory and the main raws for the last two).

Quietust

2010-10-25 13:42

reporter   ~0013511

Last edited: 2010-10-25 13:45

Just confirming that this is still a problem in version 0.31.16 - I dug out some rough rock crystals (and allowed them to be stockpiled nearby), made some pearlash, then tried making a crystal glass terrarium.

"èrith Adiltekkud, Weaver cancels Make crystal glass Terrarium: Needs glass-making rough gems."

Farmerbob

2011-01-06 15:50

reporter   ~0014813

I am still experiencing this issue in DF 0.31.18

Cannot make anything from raw crystal glass., keep getting the "Needs glass-making rough gems" error.

InsanityPrelude

2011-03-31 09:27

reporter   ~0016860

Noticed it again in 31.21.

Jyrinx

2011-04-03 01:35

reporter   ~0017002

My baroness demands crystal glass items; right now, I'd have to say this issue is more than “minor” to me (and I suspect that whichever dorf gets thrown in a cage for violating a work order will agree ...)

Quietust

2011-04-03 09:32

reporter   ~0017010

Jyrinx: you might be able to accomplish that by cutting raw crystal glass, which you can buy from caravans.

malvado

2011-05-21 16:50

reporter   ~0017816

Since this bug has been around for about a year, isn't it time for it's Severity to be increased? Depending on your mayor this can pretty much ruin a fortress if you are quite unlucky.

Quietust

2011-05-28 22:29

reporter   ~0017892

Last edited: 2011-06-18 19:19

With the help of a debugger, I managed to locate the problem - when a job attempts to check if a rough gem is good for glass-making, it calls a function which is supposed to fetch the item's material and check if property flag number 50 (CRYSTAL_GLASSABLE) is set. Unfortunately, it seems to be done through a macro of the form "CHECK_MATERIAL_FLAG(flag,mat,submat)" which in this case is being called with the "flag" parameter in the wrong place (at the end instead of at the beginning), meaning that, instead of evaluating to "getMaterial(mat_type, mat_subtype).checkFlag(50)", it's ending up with "getMaterial(mat_subtype, 50).checkFlag(mat_type)" which always fails (unless you've modded mountain gnomes to have about 50 additional materials such that the 70th material is made of [BONE]).

For the Win32 SDL 0.31.25 build, the following binary patch fixes crystal glass production:
0036AE87: 7C B8 32 00 00 00 -> 78 0F BF 47 7C 90
0036AE9B: 0F BF 4F 78 85 C9 78 2D -> B9 32 00 00 00 90 90 90

MaDeR Levap

2011-06-04 04:53

reporter   ~0017931

Wow. No, I am not sarcastic. Binary patch?! Did you sent to Toady your analysis? Maybe then he will FINALLY get around to fix this line of code. -.-

Egodeus

2011-06-30 11:45

reporter   ~0018108

Last edited: 2011-06-30 12:52

I tested Quietust's patch and it fixes the problem with crystal glass. Could Footkerchief promote this to Toady for fixing as this testing shows that the fix requires only moving a few variables around in a function call. This would make it unnecessary to hoard raw crystal glass for mandates and also allow us to actually make all kinds of sweet items from crystal glass.

A test showing the effects of the modification by Quietust:
http://dffd.wimbli.com/download.php?id=4597&f=region3+Making+a+crystal+glass+door.zip

Hieronymous Alloy

2011-07-30 09:08

reporter   ~0018370

How do you go about installing this patch manually, then? or is that even possible?

Quietust

2011-07-30 09:22

reporter   ~0018371

You "install" the patch by using a hex-editor and manually changing the indicated bytes at the indicated addresses.

Hieronymous Alloy

2011-08-01 06:22

reporter   ~0018406

Last edited: 2011-08-01 07:18

Ack! I don't suppose anyone wants to post an edited/fixed file somewhere? I'm not a hex editor, but I can download and copy over a file.

Quietust

2011-08-22 07:26

reporter   ~0018609

Patch for the Win32 Legacy 0.31.25 build:
00389747: 7C B8 32 00 00 00 -> 78 0F BF 47 7C 90
0038975B: 0F BF 4F 78 85 C9 78 2D -> B9 32 00 00 00 90 90 90

Kogut

2011-10-19 00:15

reporter   ~0018867

http://dffd.wimbli.com/file.php?id=4865 - This is the hex patched version of DF 0.31.25 WINDOWS SDL. It restores the use of crystal glass as stated in the bug report http://www.bay12games.com/dwarves/mantisbt/view.php?id=1498#c17892 by Quietust.

http://dffd.wimbli.com/file.php?id=4886 - This is the hex patched version of DF 0.31.25 WIDOWS LEGACY. It restores the use of crystal glass as stated in the bug report http://www.bay12games.com/dwarves/mantisbt/view.php?id=1498#c17892 by Quietust.

To use:
simply over write your Dwarf Fortress.exe with this one.

Quietust

2012-02-01 10:15

reporter   ~0019445

Binary patch for version 0.31.25 Linux: (untested)
57335F : 0C -> 04
573367 : 08 -> 0C
573376 : 04 -> 08

Toady One

2012-02-16 17:11

administrator   ~0019877

This should be corrected in 0.34.01.

Issue History

Date Modified Username Field Change
2010-04-24 13:59 Draco18s New Issue
2010-04-24 14:14 Logical2u Note Added: 0004920
2010-04-24 14:21 Draco18s Note Added: 0004921
2010-04-24 14:23 Draco18s Note Edited: 0004921
2010-04-24 14:28 Draco18s Note Edited: 0004921
2010-04-25 01:52 user6 Note Added: 0004961
2010-04-25 01:53 user6 Note Edited: 0004961
2010-04-25 01:53 user6 Note Edited: 0004961
2010-04-25 01:54 user6 Note Edited: 0004961
2010-04-25 10:38 user6 Note Edited: 0004961
2010-04-25 14:13 Draco18s Note Added: 0005036
2010-04-25 14:51 DoctorZuber Note Added: 0005039
2010-04-25 14:53 DoctorZuber Note Edited: 0005039
2010-04-25 14:53 DoctorZuber Note Edited: 0005039
2010-04-25 15:12 user6 Note Added: 0005042
2010-04-25 15:13 user6 Note Edited: 0005042
2010-04-25 15:35 Draco18s Note Added: 0005047
2010-04-25 15:36 Draco18s Note Edited: 0005047
2010-04-25 16:18 user6 Summary Raw Glass Cannot Make Windows => Clear glass items can't be made
2010-04-25 16:19 user6 Note Added: 0005052
2010-04-25 19:09 clamity Note Added: 0005066
2010-04-26 11:08 FunkyWaltDogg Note Added: 0005150
2010-04-26 11:11 user6 Note Edited: 0005052
2010-04-26 11:11 user6 Summary Clear glass items can't be made => Crystal glass items can't be made
2010-04-26 11:11 user6 Note Added: 0005152
2010-04-26 13:09 Rafal99 Note Added: 0005166
2010-04-26 17:05 Malicus Note Added: 0005207
2010-04-26 18:00 user6 Summary Crystal glass items can't be made => Crystal glass items can't be made, CRYSTAL_GLASSABLE appears broken
2010-04-26 19:49 qwints Note Added: 0005241
2010-04-30 13:32 user6 Relationship added has duplicate 0001281
2010-05-04 17:56 bakawolf Note Added: 0006129
2010-05-07 01:47 Jerkwhistle Note Added: 0006336
2010-10-25 13:42 Quietust Note Added: 0013511
2010-10-25 13:45 Quietust Note Edited: 0013511
2010-11-16 13:35 user6 Relationship added related to 0003408
2011-01-06 15:50 Farmerbob Note Added: 0014813
2011-03-01 23:59 user6 Sticky Issue No => Yes
2011-03-31 09:27 InsanityPrelude Note Added: 0016860
2011-04-03 01:35 Jyrinx Note Added: 0017002
2011-04-03 09:32 Quietust Note Added: 0017010
2011-05-21 16:50 malvado Note Added: 0017816
2011-05-28 22:29 Quietust Note Added: 0017892
2011-05-29 08:56 Quietust Note Edited: 0017892
2011-05-29 18:25 Quietust Note Edited: 0017892
2011-06-01 13:28 Quietust Note Edited: 0017892
2011-06-01 13:28 Quietust Note Edited: 0017892
2011-06-01 13:28 Quietust Note Edited: 0017892
2011-06-04 04:53 MaDeR Levap Note Added: 0017931
2011-06-18 19:19 Quietust Note Edited: 0017892
2011-06-30 11:45 Egodeus Note Added: 0018108
2011-06-30 11:46 Egodeus Tag Attached: Probable Quick Fix
2011-06-30 12:52 Egodeus Note Edited: 0018108
2011-07-30 09:08 Hieronymous Alloy Note Added: 0018370
2011-07-30 09:22 Quietust Note Added: 0018371
2011-08-01 06:22 Hieronymous Alloy Note Added: 0018406
2011-08-01 07:18 Hieronymous Alloy Note Edited: 0018406
2011-08-22 07:26 Quietust Note Added: 0018609
2011-10-19 00:15 Kogut Note Added: 0018867
2011-10-27 22:40 Kogut Tag Attached: binary patch
2012-02-01 10:15 Quietust Note Added: 0019445
2012-02-15 12:22 user6 Tag Detached: Probable Quick Fix
2012-02-16 17:11 Toady One Note Added: 0019877
2012-02-16 17:11 Toady One Status new => resolved
2012-02-16 17:11 Toady One Fixed in Version => 0.34.01
2012-02-16 17:11 Toady One Resolution open => fixed
2012-02-16 17:11 Toady One Assigned To => Toady One
2012-03-17 07:11 user11 Sticky Issue Yes => No
2014-01-27 13:45 user6 Relationship added related to 0000788
2014-01-27 13:45 user6 Relationship replaced has duplicate 0000788