pjf / masterwork-dwarf-fortress

Patches and bugfixes applied to Meph's amazing Masterwork Dwarf Fortress
33 stars 22 forks source link

inclusion of new masterwork settings source #19

Closed splintermind closed 10 years ago

splintermind commented 10 years ago

all the source files are added in their own folder. some directory restructuring and a few file changes.

splintermind commented 10 years ago

yes, the plant_grasses change should be applied everywhere, and it should be permanent. the latest commit corrects this in the graphics pack raws. the problem is, it's a conflicting setting. normally if you have cavern flavours enabled, then standard (standart?) is disabled. however in the initial raws, both standard and flavours are enabled.

the utilities in question were actually duplicates. this project was originally created using LNP as a base, and later it appears the utilities were copied, rather than moved. so everything removed from the 'content' folder was unused. you'll find all the utilities you're concerned that were removed here: https://github.com/splintermind/masterwork-dwarf-fortress/tree/master/MasterworkDwarfFortress/Utilities

it appears i accidentally removed the jolly bastion default color scheme, so i've added that back in the latest commit. there was also an ASCII color scheme that isn't in your repository. the rest of the color schemes are identical, they've just been moved out of the nested folder structure and renamed.

the only concern is that now color schemes are decoupled from graphic tilesets; you choose a color, and you choose a tileset. if there are some tilesets that really should have a particular scheme applied to them, i could make accommodations to check for it, but i'm not sure how necessary it is.

pjf commented 10 years ago

Awesome! You rock! :)

Merging now, and then falling into bed. I hope to test the new settings executable in the morning, and if all works well I'll merge it into the unified branch.

Many thanks again! :)

splintermind commented 10 years ago

great! i look forward to your impressions regarding the new GUI!

On Fri, Nov 22, 2013 at 1:21 PM, Paul Fenwick notifications@github.comwrote:

Merged #19 https://github.com/pjf/masterwork-dwarf-fortress/pull/19.

— Reply to this email directly or view it on GitHubhttps://github.com/pjf/masterwork-dwarf-fortress/pull/19 .

-josh

--my divinity is caught between the colors of a butterfly--

pjf commented 10 years ago

I would love to give impressions. Unfortunately, I can't seem to get it running under wine. While I'm aware that Masterwork targets Windows, I use linux+wine exclusively to play, so I'm only able to give feedback if I can get things running under that.

Currently, running Masterwork Dwarf Fortress.exe under wine 1.7.3 (or any other version I've tried) gives multiple (possibly harmless) warnings that PngDecoder_Block_GetCount and JpegDecoder_Frame_CopyPalette are stubs, followed by an unhandled exception:

Unhandled Exception:
System.InvalidOperationException: WinForms_SeeInnerException ---> System.NullReferenceException: Object reference not set to an instance of an object
  at System.Windows.Forms.TextRenderer.MeasureTextInternal (IDeviceContext dc, System.String text, System.Drawing.Font font, Size proposedSize, TextFormatFlags flags, Boolean useMeasureString) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextRenderer.MeasureText (System.String text, System.Drawing.Font font) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Ribbon.get_OrbBounds () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Ribbon.UpdateRegions (System.Drawing.Graphics g) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Ribbon.UpdateRegions () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Ribbon.set_OrbStyle (RibbonOrbStyle value) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Ribbon:set_OrbStyle (System.Windows.Forms.RibbonOrbStyle)
  at MasterworkDwarfFortress.MainForm.InitializeComponent () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) MasterworkDwarfFortress.MainForm:InitializeComponent ()
  at MasterworkDwarfFortress.MainForm..ctor () [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at MasterworkDwarfFortress.My.MyProject+MyForms.Create__Instance__[MainForm] (MasterworkDwarfFortress.MainForm Instance) [0x00000] in <filename unknown>:0 
  at MasterworkDwarfFortress.My.MyProject+MyForms.get_MainForm () [0x00000] in <filename unknown>:0 
  at MasterworkDwarfFortress.My.MyApplication.OnCreateMainForm () [0x00000] in <filename unknown>:0 
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0 
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0 
  at MasterworkDwarfFortress.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: WinForms_SeeInnerException ---> System.NullReferenceException: Object reference not set to an instance of an object
  at System.Windows.Forms.TextRenderer.MeasureTextInternal (IDeviceContext dc, System.String text, System.Drawing.Font font, Size proposedSize, TextFormatFlags flags, Boolean useMeasureString) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextRenderer.MeasureText (System.String text, System.Drawing.Font font) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Ribbon.get_OrbBounds () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Ribbon.UpdateRegions (System.Drawing.Graphics g) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Ribbon.UpdateRegions () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Ribbon.set_OrbStyle (RibbonOrbStyle value) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Ribbon:set_OrbStyle (System.Windows.Forms.RibbonOrbStyle)
  at MasterworkDwarfFortress.MainForm.InitializeComponent () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) MasterworkDwarfFortress.MainForm:InitializeComponent ()
  at MasterworkDwarfFortress.MainForm..ctor () [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at MasterworkDwarfFortress.My.MyProject+MyForms.Create__Instance__[MainForm] (MasterworkDwarfFortress.MainForm Instance) [0x00000] in <filename unknown>:0 
  at MasterworkDwarfFortress.My.MyProject+MyForms.get_MainForm () [0x00000] in <filename unknown>:0 
  at MasterworkDwarfFortress.My.MyApplication.OnCreateMainForm () [0x00000] in <filename unknown>:0 
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0 
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0 
  at MasterworkDwarfFortress.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0 

Unhandled Exception:
System.MemberAccessException: Object is busy and cannot state allow this operation [GDI+ status: ObjectBusy]
  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in <filename unknown>:0 
  at System.Drawing.Graphics.Dispose () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Drawing.Graphics:Dispose ()
  at System.Drawing.Graphics.Finalize () [0x00000] in <filename unknown>:0 

I have no idea if there's an easy fix for this at not. :/

I'm currently downloading wine 1.7.7 in case recent bugfixes alleviate the problem.

pjf commented 10 years ago

(Same error under wine 1.7.7)

splintermind commented 10 years ago

Is that running with mono?

On 23 Nov 2013 13:05, "Paul Fenwick" notifications@github.com wrote:

(Same error under wine 1.7.7)

— Reply to this email directly or view it on GitHub.

pjf commented 10 years ago

mono 2.8 and vcrun 2008.

Let me try upgrading some libraries and see if that helps. :)

pjf commented 10 years ago

Still no joy. Mono 2.10 and vcrun 2010 don't help, neither has messing with DLL overrides yet. (Everything consistently gives System.InvalidOperationException: WinForms_SeeInnerException ---> System.NullReferenceException: Object reference not set to an instance of an object, except when I've totally booched my mono install, in which case I'm told to install mono.)

splintermind commented 10 years ago

well shit. there's probably some incompatible code with the third party ribbon menu and mono from the looks of it. i thought since the project was written in .net it was because it was windows only. :S

On Sat, Nov 23, 2013 at 1:48 PM, Paul Fenwick notifications@github.comwrote:

Still no joy. Mono 2.10 and vcrun 2010 don't help, neither has messing with DLL overrides yet. (Everything consistently gives System.InvalidOperationException: WinForms_SeeInnerException ---> System.NullReferenceException: Object reference not set to an instance of an object, except when I've totally booched my mono install, in which case I'm told to install mono.)

— Reply to this email directly or view it on GitHubhttps://github.com/pjf/masterwork-dwarf-fortress/pull/19#issuecomment-29131780 .

-josh

--my divinity is caught between the colors of a butterfly--

pjf commented 10 years ago

Rejoice!

Installing .NET 4.0 brings relief!

Testing now. :)

splintermind commented 10 years ago

yeah you'll need .net 4 for sure! i hope that's all it is, because the mono compatibility tool is telling me it's not going to work haha.

On Sat, Nov 23, 2013 at 2:00 PM, Paul Fenwick notifications@github.comwrote:

Rejoice!

Installing .NET 4.0 brings relief!

Testing now. :)

— Reply to this email directly or view it on GitHubhttps://github.com/pjf/masterwork-dwarf-fortress/pull/19#issuecomment-29131963 .

-josh

--my divinity is caught between the colors of a butterfly--

pjf commented 10 years ago

As long as it runs with .NET 4 installed, I'm happy. I haven't tried with an absolutely clean wine install, but I imagine most of our user-base will be using real versions of Windows, and so will be problem free.

Playing around with the new configuration tool seems to work great (better than Meph's one under my version of wine). It picks up all the tilesets fine, it opens the manuals fine; I can't run programs/utilities from it, but that's a known bug in my wine set-up, not anything to do with your code.

The only gotcha I've hit so far is that selecting a tileset doesn't install that until I hit the 'install tileset' button. That means I can think I've changed tilesets, but I haven't. I'd suggest a dialog pop-up along the lines of 'you're about to change tilesets, are you sure?" if you care about getting user confirmation, or just changing the tilesets if you don't.

I agree that changing the colour-scheme at the same time as the tileset is a good idea for those tilesets which have custom colours. I know DF users tend to be pretty advanced, but having them remember to change colours is another point at which they can make mistakes.

I also keep looking for 'Settings.exe', and forgetting that it's now called 'Masterwork Dwarf Fortress.exe'. I have no idea if anyone else cares. (typing wine Settings.exe is in my muscle memory.)

Otherwise everything changed the way I expected when I twiddled with all the settings (inspected using git diff on my personal play branch), so I think this is looking good. :) I'm going to work on integrating it into the unified branch, where all the cool new toys are. :)

Thank you very much again for all your efforts!

Paul

splintermind commented 10 years ago

whew, well i'm glad it's running ok!

i know what you mean about changing the tilesets, my first instinct was to have a prompt upon changing them and install it right then, rather than having the button. i'll see about changing it to that instead.

what i'd propose for the tileset colors is to prompt to install the color file if one is found for the particular tileset, ie. 'this tileset has a color scheme to match, would you like to apply it as well?'. i don't suppose you know which ones actually have custom schemes? i think jolly and cla, but i'm not sure on the others.

On Sat, Nov 23, 2013 at 2:23 PM, Paul Fenwick notifications@github.comwrote:

As long as it runs with .NET 4 installed, I'm happy. I haven't tried with an absolutely clean wine install, but I imagine most of our user-base will be using real versions of Windows, and so will be problem free.

Playing around with the new configuration tool seems to work great (better than Meph's one under my version of wine). It picks up all the tilesets fine, it opens the manuals fine; I can't run programs/utilities from it, but that's a known bug in my wine set-up, not anything to do with your code.

The only gotcha I've hit so far is that selecting a tileset doesn't install that until I hit the 'install tileset' button. That means I can think I've changed tilesets, but I haven't. I'd suggest a dialog pop-up along the lines of 'you're about to change tilesets, are you sure?" if you care about getting user confirmation, or just changing the tilesets if you don't.

I agree that changing the colour-scheme at the same time as the tileset is a good idea for those tilesets which have custom colours. I know DF users tend to be pretty advanced, but having them remember to change colours is another point at which they can make mistakes.

I also keep looking for 'Settings.exe', and forgetting that it's now called 'Masterwork Dwarf Fortress.exe'. I have no idea if anyone else cares. (typing wine Settings.exe is in my muscle memory.)

Otherwise everything changed the way I expected when I twiddled with all the settings (inspected using git diff on my personal play branch), so I think this is looking good. :) I'm going to work on integrating it into the unified branch, where all the cool new toys are. :)

Thank you very much again for all your efforts!

Paul

— Reply to this email directly or view it on GitHubhttps://github.com/pjf/masterwork-dwarf-fortress/pull/19#issuecomment-29132272 .

-josh

--my divinity is caught between the colors of a butterfly--

pjf commented 10 years ago

I am but a humble change engineer. ;) I haven't checked to see which tiles come with which colours.

I do like the idea of prompting to install the appropriate colours, although I imagine very few people will decline the matching colour scheme.

Paul

splintermind commented 10 years ago

i've updated the project with a set of changes for the stuff we talked about, if you want to take another look.

On Sat, Nov 23, 2013 at 4:04 PM, Paul Fenwick notifications@github.comwrote:

I am but a humble change engineer. ;) I haven't checked to see which tiles come with which colours.

I do like the idea of prompting to install the appropriate colours, although I imagine very few people will decline the matching colour scheme.

Paul

— Reply to this email directly or view it on GitHubhttps://github.com/pjf/masterwork-dwarf-fortress/pull/19#issuecomment-29133894 .

-josh

--my divinity is caught between the colors of a butterfly--