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 - kr0pper

Pages: [1]
1
My personal letters over Phoebus' tileset.
It's for TwbT, 24x24, font is modifying Consolas.
Made for my big monitor and my poor eyesight. 8)

Example:
Spoiler (click to show/hide)

Download:
https://www.dropbox.com/s/71dxw3ss5y9ep0k/phoebus_twbt.png?dl=0

init.txt
Spoiler (click to show/hide)

2
I wrote a little script which monitors selected dwarf and put any changes of him into log file.
Examples like ''Now I'am a superior mason, I like stones" or "This boulder is too heavy, I hate boulders all my life"

It's will be good to see some ideas to monitoring, maybe:
- diary about recent events: food, drinks, buildings, items... ("Roast was little rotten, but... Ahh, om-nom-nom, vermins are delicious!")
- look around for preferred items, buildings, friends ("That damn Urist sleeps, why I can't relax too?")
- attributes, skills and labors ("Why, Armok? I don't want to hunt, I want a party!")
- any other random events ("Dear diary, life is miserable. I want to kill these goblins, but all I must to do is refuse their ugly bodies. Life is stink.")

I think is the best to use external dictionaries for random phrases about all above.  ???

3
Utilities and 3rd Party Applications / Re: Text Will Be Text - dfhack plugin
« on: September 16, 2014, 12:30:28 pm »
I'll probably try to add support for binding mouse events into dfhack then.

It's a good idea, I try to make navigation through main menu with mouse, but only way is external remapping utilities like autohotkey.

4
Utilities and 3rd Party Applications / Re: DFHack 0.40.10-r1
« on: August 31, 2014, 03:11:44 pm »
Do you know of a way to modify the script so it only fires on initial embark?

Hmmm, don't understand.

Do you want to load script only one time when you desired?
Create a file named my_embark.txt in df folder, add all your wishes there, like:
Spoiler (click to show/hide)

and just run it in dfhack console after embark, eg:
Code: [Select]
script my_embark.txt

PS: And you don't need "load into workflow from the start" - workflow saves all jobs into df save.

5
Utilities and 3rd Party Applications / Re: DFHack 0.40.10-r1
« on: August 31, 2014, 02:10:12 pm »
Interesting, so you prefer for your dwarves to just continue digging as they find interesting material... do you ever run into issues where they dig new access points to the fortress?  Undefended ones?
And do you know why workflow drink doesn't work?

I'm always can do "digFlood digAll0", and back again with "script digflood.txt"

Maybe you need use "workflow amount DRINK 10000 1" (with caps) because it it raw token?
Taken from my working workflow.txt script loaded from my dfhack_onLoad.init

6
It'll be worse with twbt nextgen, as it will blank the screen with dfhack commands to avoid the text artifacts...
I try to build twbt by myself for tests. :)

And please consider using IronAHK, because Autohotkey is windows only.

I don't have any GUI machines except Windows, and can't test.

You can just press Ctrl-Alt-Shift-F9 when mouse cursor in desired location, sorry.

7
Is there any plans to add any more complex scripting to Therapist?

I made a script, which puts realtime to file some lines like these:
Code: [Select]
1409332012 20422 Solon Lumashilral job_initiate 37 StoreItemInStockpile
1409332012 15166 Reg Kosothdakost job_complete 87 EncrustWithGems

Right now I'm at war with Lazarus for creating an interface like Therapist for monitoring jobs, syndromes, wounds and more.

It's will be cool to look the joblist and happiness changes of any dwarf inside DT  :)

8
Utilities and 3rd Party Applications / Re: DFHack 0.40.10-r1
« on: August 31, 2014, 12:55:10 pm »
set it into a "LNP_dfhack_onLoad" init

As i know, this file overwrites automatically.

I just create dfhack_onLoad.init in df folder and put next line to my dfhack.init:
Code: [Select]
:lua dfhack.onStateChange.onloadscript = function(state) if state == SC_WORLD_LOADED then print(dfhack.run_command('script dfhack_onLoad.init')) end end

Spoiler (click to show/hide)

9
Interesting idea, and I made another example of this

It's very complex, and in very early development, there is a lot of crutches.
Because I'm a newb in DF hacking and every new line of code opens new undeground caverns in my knowledge.


All actions binded on middle mouse click with autohotkey script. Or you can use any other way - AHK just send "Ctrl-Alt-Shift-F9" to DF window.


Middle click in sidebar:
- in main menu - any command, eg "z: Status" or "B: building" (pause/resume works too)
- on empty space - return to previous
- at "designations" - selects an desgn command
- at "building" - select building or construstions or machine components, also you can middle click on "+-*/" below to move cursor/page
- middle click in any other screen except dwarfmode just send ESC


Middle click on map shows context menu, where you can use left click to select an action.
Right/middle click or ESC hides menu
Here I click on map, then click first line "Designate dig"




How to install:

1. Append a line to your dfhack.init or just execute from console
Code: [Select]
keybinding add Ctrl-Alt-Shift-F9 mouse_concept
2. Download script and put it in {DF}\hack\scripts\
https://www.dropbox.com/s/hkwt0ybxbg5zz74/mouse_concept.lua

3. AutoHotkey script, just download and execute
https://www.dropbox.com/s/yegcabqdy9aaocd/mouse_concept.ahk (81byte)
OR
https://www.dropbox.com/s/tk9kqj3opm06ic5/mouse_concept.exe (1 174 528 bytes)



Limitations:
DF 34.11 and DFHack 0.34.11-r5 (all from PeridexisErrant LNP r64)
And TWBT interprets viewscreen of context menu as text.


It's all made for proof of concept and fun, because hacking the DF is fun 8)

PS: Thanks to all community for sources in, out and around DFHack - it's gave me a lot of ideas and inspiration.

10
Utilities and 3rd Party Applications / Re: DFHack 0.40.08-r2
« on: August 20, 2014, 05:02:47 pm »
most stockpile applications would be happy with a simple list of stored items.

I'm a newbie in c++, so lua is my way.
For example, need to create "cut gems" jobs in linked workshop according stored rough gems in stockpile.

There's a some ways I tested:
1. check stockpile's settings and iterate items in df.global.world.items.other.[TYPE]
2. iterate items from highest to lower id
3. cache items, and use an EventManager.onItemCreated for update cache

checking the items vector of each overlapping 16x16 map block, but that requires some calculations

Interesting. Via dfhack.maps.getTileBlock(coords).items ?
And find items via df.item.find(X) ? I'll try it.

There is an unnamed vmethod in df.buildings.xml
How to call a numbered vmethod in lua? All vmethods in *.h are protected.




ADDED:

checking the items vector of each overlapping 16x16 map block, but that requires some calculations


Brilliant!

A little change in hack/lua/plugins/stockflow.lua.
For test, I replaced function findItemsAtTile by this:

Code: [Select]
function findItemsAtTile2(x, y, z)
local found = {}
local items = dfhack.maps.getTileBlock(x, y, z).items
for _, item_id in ipairs(items) do
local item = df.item.find(item_id)
if item.pos.x == x and item.pos.y == y and
item.pos.z == z and item.flags.on_ground then
found[#found+1] = item
end
end
return found
end

and run check_pile(stockpile, true)

Was: 101 sec.
Now:  1 sec.

Much better now 8)

11
Utilities and 3rd Party Applications / Re: DFHack 0.40.08-r2
« on: August 19, 2014, 02:08:57 pm »
A little question about stockpiles and lua.

As I can see in stockflow.lua - stockpile is a bunch of tiles with special flags.
So, if I want to get all items in selected stockpile - I must flow through all "df.global.world.items.all" and compare their position/on_ground with coords of my stockpile' tiles?
There's no easiest way?

12
DF Modding / [WIP] encrust_control, script for control of gem jobs
« on: August 10, 2014, 10:17:42 am »
Do you like these masterfully worked images of dwarves in diamods and clear tourmaline on your platinum sarcophagi?

Me too.
But I'm tired to press A-E-F-R again and again.

So, an idea for script:
1. find some gems in items
2. add encrust job to workshop

Tested on DFHack 0.34.11-r5

https://www.dropbox.com/s/n7e6980v4oiih9y/encrust_control.lua


Usage:
- put script to /hack/scripts/
- assign your legendary gem setter to jeweler's workshop
- run "encrust_control" for help


Limitation:
Work still in progress, so script tries to pause the game and temporary disable workflow plugin for unprotect repeated jobs.


UPDATE 2014-08-24:

New command which add "cut gems" job to selected workshop.
Gems taken from linked stockpile.

Using it in my current game on 34.11, and no problems found.

Pages: [1]