Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Warmist

Pages: 1 ... 16 17 [18] 19 20 ... 75
256
Utilities and 3rd Party Applications / Re: DFHack 0.43.03-r1
« on: October 04, 2016, 12:44:55 am »
Linux is nice and easy, git clone *dfhack addy*, cd dfhack, git checkout develop, git submodule --init, cd build, ccmake .., configure it for 64 bit architecture, generate and exit, make install, wait.
Linux is nice and easy*

* easy when it works
* nice when you are used to building stuff for yourself
* when it does not break in some arcane way

:D

257
Utilities and 3rd Party Applications / Re: DFHack 0.43.03-r1
« on: September 28, 2016, 03:42:19 am »
Another announcement of sorts:

It turns out Ruby 1.8 (which we use) doesn't actually compile for 64-bit Windows, at least not without techniques that nobody has investigated. Ruby 2+ would compile, but I don't know if it would work, so I'm waiting on jjyg for that.

Besides that, I can't think of any major blockers for a pre-release (there are some for a stable release). Do note that if we did put up a build now, no ruby scripts would work at all in the 64-bit Windows build. (I suppose now would be a good time to convert "multicmd" to a built-in command, before that becomes an issue.)

Hmm.  Just to float the idea, what are the arguments for and against dropping Ruby support?

Keep Ruby:  seriously, it's fine.  Why break what works?  People actually do use it!

Drop Ruby:
  • No API documentation at all
  • Relatively poor structures API (I think?  Hard to tell when there's no docs...)
  • Standardising on Lua would free up developer resources
  • Fewer scripts - there are 190 .lua and 38 .rb files in the dfhack repo; 147 to 28 in the scripts repo.
  • Fixing and maintaining Ruby support might be a similar amount of work to dropping it and a one-off porting effort; especially if fixing it involves a useful degree of documentation.
  • It makes tooling more difficult (number of languages installed, cases for build systems, docs support, etc) for developers and deters new contributors.
To be clear, I'm not proposing that we should drop Ruby support because it's run into a problem here - it's because Ruby has been a second-class scripting language in DFHack for some time now, the total absence of documentation is annoying me, and it makes supporting other things (eg unifying in-console help) more difficult.
The biggest issue (at least as i understand it) is that the wrapper for lua is mostly automatically generated from layouts. While the ruby wrapper is handcrafted to some extent. Ideal case would be extending lua wrapper generation to support other languages.
That being said - never liked ruby :D (well except those few experimentation weeks long time ago, but we all were young... :D )

258
Utilities and 3rd Party Applications / Re: DFHack 0.43.03-r1
« on: September 20, 2016, 05:11:48 am »
I meant ruby is friendlier than C++, not lua, lua is cuddly.
Well at least C++ is !!FUN!!

259
Is it possible to butcher a corpse with a script? I know create-unit uses code from the arena to spawn a creature. There is also the arena butchering. You could theoretically make a script that spawns a creature, kills it (blood = 0), butchers it, then erases all non-bone items.
At that point, it's easier to create the bone.
I'm sure someone could edit this to work: https://gist.github.com/warmist/8450238
This of course is too complicated - it both removed the heart from the unit and then creates the heart item and places it on ground. So the first part is not needed and the second part can probably be simplified to not use historical id and so on...

260
So, to review...

Steps to acquire a cow bone:

1. Acquire a cow bone.
Imho: kill a cow and butcher it is way easier.

261
I have no idea... I looked at the offending code, but didn't see any obvious problems. I'll try to reproduce the error when I get home.

You did use the .png tilesheet right? .bmp won't work (but it still shouldn't give that error).
Yup png. Also tried deleting The magenta background

262
Utilities and 3rd Party Applications / Re: DFHack 0.43.03-r1
« on: September 06, 2016, 12:50:19 pm »
Hmmm, I was doing different cave-in experiments with ice and obsidian and constructions in adventurer mode, it's how I clear magma and such for constructions in a lot of areas, and I've used it to punch through the floors of cavern lakes as well.
Actually obsidian is yet another special case. Because of that you can only have one "obsidian" per DF (sadly).

263
Utilities and 3rd Party Applications / Re: DFHack 0.43.03-r1
« on: September 06, 2016, 08:37:58 am »
I did do some experiments with the tiletypes command, which let me put dirt walls anywhere except constructions.

What I didn't test, but what I would want this for, was see if trees grow on the resulting dirt.

I want hanging gardens.
Ah yes i forgot. Also there is layers and soil-layers. So soil is a bit of special thing.

Edit: now i also want that... Maybe some other method? e.g designate farm, plant "special" plant -> turn into dirt. This way you could ask players to engineer the pumping and etc. because imho the replace construction part is the harder one

264
Utilities and 3rd Party Applications / Re: DFHack 0.43.03-r1
« on: September 06, 2016, 08:04:39 am »
How difficult is it to turn constructions into natual stone?

I want to make a plugin that allows you to make dirt walls. (Any dirt, because specifying isn't possible)

Short answer: yes
Long answer: no

J.k...

There is a question of "natural" and "stone". You say you want to make dirt walls, which is different from "stone". In DF there is such thing as "layers" and "regions" and so on. Thus "natural" tiles get to be fixed (e.g. you can't have dirt in lower levels (note: not sure how cave-ins do it though) ). And the second thing is "unnatural" - i.e. vein materials.
So if you want to have fullproof script/plugin it needs to:
  • create a new vein (or check if correct one exists) with correct material
  • set tile-type to the "undug vein tile"
  • probably set the tile one level up as "floor" for the same vein
  • probably remove construction that did this
  • maybe mark some flags (e.g. recalculate pathing?)
So it's not trivial but not very hard either.

265
I just tried running it with default tileset (curses 800x600) and it crashes. Am i doing something wrong?

Crashlog:
Spoiler (click to show/hide)

266
In your example the "widgets.Panel" does not have the "frame" setting at all. Thins makes it at middle or sth...

Frame_rect is outside (in parent coords) and body_rect is inside (in parent coords) e.g. if you have frame_rect={t=2} and body_rect={t=3} it has 2 tile outline before "frame" (the box) is drawn and 3 tiles until the contents are drawn. That is if i remember correctly.

For me at least the thing i missed most is text auto flow - adding newlines automatically.


267
One issue is that overlays don't necessarily have to be rectangles. They usually are, but it's not required, and there's no reason for it to be required currently.

Mifki did come up with a solution that involves rendering the vanilla dwarfmode/adventurer screens to a separate text buffer, overlaying whatever DFHack screens draw (as text, not explicitly to the map) to that, then rendering the result. (At least, that's how I remember it.)
I think that was the code I was editing.  It does seem to be there but doesn't work for the dfhack viewscreens.  I'll make it optional so that its not necessarily on for all views only for ones with the callback implemented.


Ok. Running into issues with Lua forms again.  I'm really confused by the dynamic layout engine for automatically placing widgets/subviews/... .  Sometimes it works as I expect some times it doesn't. 

My issue is that I would like to have the view dynamically size based on the size of the screen.  I suppose I can manually calculate all of the positions but it seems like there was some basic support.  For example, a subview stack might be { Label, FilteredList, Edit, Label, HorizontalRule, Label, HorizontalRule, Label }  where HorizontalRule is a new widget I created to draw a straight line and CustomControl was just something with custom drawing.   I'd like everything but the FilteredList to be fixed size in a vertical layout but the items below the list are relative to the bottom.

Sometimes the labels and edit controls seem to understand their position in the stack sometimes they don't but I'm not sure why.  I was able to workaround the sizing of the edit box by using a pane and forcing a height constraint by using on_layout.  There don't seem to be easy ways of constraining the sizes of some widgets, am I missing something or is the current behavior not anticipating use like this. 

I suppose I can write something myself or force layout but hate reinventing the wheel.  Having said that I do have a nice dynamic layout engine from a couple of decades ago for C that might work reasonably well here.  I'd worry about conflicts with existing widgets or creating a fork of sorts though.
Yeah the layout system is not perfect but it was enough for me at least. It has either one pinned side + size or both pinned + dynamic size. More like msvc forms?
Not sure what you meant by "sometimes they don't" maybe you could share a minimal example that does that?

Also imho you could do "the Qt way" i.e. containers that manage the layout. E.g. you could make a grid layout, where you can say which columns and rows are fixed and which grow.

268
designation.pile is what you're actually after. I don't know why it was named as such, but setting it to true is what makes a tile appear to be within vision range.
It's probably called like that because it's used for something else in fort mode (IIRC)

269
Thanks.  So I've started writing some preliminary scripts like one to just sort by distance of player to quickly show items and filter out junk.   One thing I've run into is I'm not sure how to filter out items that cannot be picked up like coffer, table, throne, ... furniture-type stuff.  I'm sure there are others but I'd just want to show things that normally only show up in the get menu.   

Is there a quick way or do I need to build something based on itemtype and filter it that way which seems more error prone.   For now I'll use the item:isFurniture(false) function but it seems easy to miss other cases like that. 

Next a visibility filter would be nice otherwise will stick to small radius.   Not sure how to do this yet but I guess it would be to check the screen for this somehow on the grid cell.

Is is possible to force focus the df window back to front with focus while running a script from console?  Not sure this is a good idea for production but I keep having focus issues and would use this as a debug aide.   On a related note, moving the mouse to center of the df window would be useful for testing.  ( I will assume no on both counts but just asking)
You should filter by item.flags.onground (or similar) all other items are either in container (general_ref_contained?) or in buildings (also depends if it's structural part of building or just on floor in building)

270
I've had the same idea not long ago. Yes lua is perfect for this. You can look at gui folder in scripts (forgot how the companion tool was called)

Pages: 1 ... 16 17 [18] 19 20 ... 75