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 ... 18 19 [20] 21 22 ... 75
286
Is there a guide to find render_map address?

As well as to find all other addresses https://github.com/mifki/df-twbt/blob/master/PATCHES.md

Thanks. Was lookin in the .cpp file (it contains half the instructions).
If anyone is interested the win 43.02 rendermap offset is:0xB1F140

What are you doing, if not a secret?
Mostly playing around.
At first i wanted to screenshot the map. But that needs image saving (and before that somehow forming the image). And i'm too lazy to do the opengl things you did.
Then i thought maybe i could do the multilevel render without patches (not sure i understand what they do). But got distracted.
Current thing i've done is a remote viewer + super simple http server mostly in lua. The best thing it does not move the players viewscreen. So you could have other players spying (and maybe issueing some orders?) to individual dwarves.
The code is in: code + offsets

287
Is there a guide to find render_map address?

As well as to find all other addresses https://github.com/mifki/df-twbt/blob/master/PATCHES.md

Thanks. Was lookin in the .cpp file (it contains half the instructions).
If anyone is interested the win 43.02 rendermap offset is:0xB1F140

288
Is there a guide to find render_map address?

289
DF Adventure Mode Discussion / Re: Adventure mode inns
« on: May 19, 2016, 06:22:40 am »
In your sites? Not yet. In towns and stuff, taverns, temples, and libraries are always hubs of activity.
Probably not yet. Don't think there's been a definitive answer on whether they actually work/don't work/are supposed to work but don't yet. Their lack of historical footprint is pretty damning evidence though.
Fortresses embarked over adventurer sites with 'taverns' will acknowledge the existence of an anonymous 'zone' where your tavern should be. So that's a start...

Oh yeah i tried walking around and saying stories about my site. However people were not very impressed :/
Also one time i thought some patrol wanted cold beer, but they stopped one tile away from my epic inn. :<

290
DF Adventure Mode Discussion / Adventure mode inns
« on: May 19, 2016, 01:24:42 am »
Anyone know if inns (or for that matter libraries and temples) work in adventure mode (i.e. other people come to them)?
In any case - post your awesome inns here.

291
Utilities and 3rd Party Applications / Re: DFHack 0.42.06-r1
« on: May 19, 2016, 12:01:58 am »
I think the 42.06 release was consistent enough that unless people use it enough and find a major bug or something gets passed back down from the 43.xx update process it'll remain as it is.

Also like the gm-editor changes in there, looks like it'll let us pick whether to put in stuff like df.something:new() or drop in ints and such? It was frustrating that I couldn't swap in an int with gm-editor and had to whip up a script or bit of lua (though the interpreter is still a bit of arcane wizardry) to insert it just so I could edit it to figure out what it did.
Yeah i was annoyed with it too. I would really want to have some sort "put this item to lua interpreter as <variable>" too.
Next feature i want is general_ref handling.

292
change
Code: [Select]
return function (reaction,unit,job,input_items,input_reagents,output_items,call_native)
to
Code: [Select]
return function (reaction,reaction_product,unit,input_items,input_reagents,output_items,call_native)

293
Can't help you with reaction-trigger. Those "\\" give me a headache.

Waterwell is missing "local eventful = require 'plugins.eventful' " at the begging. Sorry.

294
Utilities and 3rd Party Applications / Re: DFHack 0.42.06-r1
« on: May 18, 2016, 12:48:18 am »
You should probably put 'local ' before each of the msg variables, but it probably won't cause any problems the way it is.

Pretty grim embark scenario, there.
Its for the hermit mode.

I made a workshop that chains three reaction: #1 spawns a unit (your hermit), #2 kills all dwarves and spawns 7 coffins, #3 gives that embark message and clears all stress from the hermit.

Since create-unit works so well, I want to make every intelligent creature a choice for your hermit. That means 200 reactions for all the animal-men. :D
Well if you are scripting. Maybe it would be easier to have one reaction that shows choice dialog?

295
I thought a topic would make more sense than constantly writing PMs.

Things I currently need help with:
1. Spawning webs next to a workshop. I tried createitem, but it doesnt work with webs. I tried create-items, but it doesnt allow a location to be set. :/

2. Removing soil and creating open-space next to/under a workshop. I had a script that worked with dfhack 40.24, but now crashes the game.

3. Getting this script to run: waterwell.lua. It should check if water/magma is next to a workshop, otherwise cancel any reaction with LUA_HOOK_USEWATER/USEMAGMA_. But it only shows an errorlog.

Code: [Select]
--Lets you make reactions that require water or magma under the workshop.  Reactions must start with LUA_HOOK_USEWATER or LUA_HOOK_USEMAGMA.
local eventful = require 'plugins.eventful'
local utils = require 'utils'

local function starts(String, Start)
return string.sub(String, 1, string.len(Start)) == Start
end

function usewater(reaction,unit,job,input_items,input_reagents,output_items,call_native)
local building = dfhack.buildings.findAtTile(unit.pos)
local pos = {}
pos.x1 = building.x1
pos.x2 = building.x2
pos.y1 = building.y1
pos.y2 = building.y2
pos.z = building.z
for x = pos.x1-1, pos.x2+1, 1 do
for y = pos.y1-1, pos.y2+1, 1 do
baseBlock = dfhack.maps.ensureTileBlock(x,y,pos.z)
liquidBlock = dfhack.maps.ensureTileBlock(x,y,pos.z-1)
if liquidBlock.designation[x%16][y%16].flow_size > 0 and liquidBlock.designation[x%16][y%16].liquid_type == false then
liquidBlock.designation[x%16][y%16].flow_size = liquidBlock.designation[x%16][y%16].flow_size - 1
return
end
end
end
dfhack.gui.showAnnouncement( dfhack.TranslateName(unit.name).." cancels "..reaction.name..": Needs water." , COLOR_RED, true)
for i=0,#input_items-1,1 do
input_items[i].flags.PRESERVE_REAGENT = true
end
for i=0,#reaction.products-1,1 do
reaction.products[i].probability = 0
end
end


function usemagma(reaction, reaction_product, unit, input_items, input_reagents, output_items, call_native)
local building = dfhack.buildings.findAtTile(unit.pos)
local pos = {}
pos.x1 = building.x1
pos.x2 = building.x2
pos.y1 = building.y1
pos.y2 = building.y2
pos.z = building.z

for x = pos.x1-1, pos.x2+1, 1 do
for y = pos.y1-1, pos.y2+1, 1 do
baseBlock = dfhack.maps.ensureTileBlock(x,y,pos.z)
liquidBlock = dfhack.maps.ensureTileBlock(x,y,pos.z-1)
if liquidBlock.designation[x%16][y%16].flow_size > 0 and liquidBlock.designation[x%16][y%16].liquid_type == true then
liquidBlock.designation[x%16][y%16].flow_size = liquidBlock.designation[x%16][y%16].flow_size - 1
return
end
end
end

dfhack.gui.showAnnouncement( dfhack.TranslateName(unit.name).." cancels "..reaction.name..": Needs magma." , COLOR_RED, true)
for k,v in ipairs(input_reagents) do
input_reagents[k].flags.PRESERVE_REAGENT = true
end
for i=0,#reaction.products-1,1 do
reaction.products[i].probability = 0
end
end

dfhack.onStateChange.loadUseLiquid = function(code)
local registered_reactions = false
if code==SC_MAP_LOADED then
--registered_reactions = {}
for i,reaction in ipairs(df.global.world.raws.reactions) do
if starts(reaction.code,'LUA_HOOK_USEWATER') then
eventful.registerReaction(reaction.code,usewater)
registered_reactions = true
elseif starts(reaction.code,'LUA_HOOK_USEMAGMA') then
eventful.registerReaction(reaction.code,usemagma)
registered_reactions = true
end
end
if registered_reactions then
print('Use Liquid Reactions: Loaded.')
end
elseif code==SC_MAP_UNLOADED then
end
end

if dfhack.isMapLoaded() then dfhack.onStateChange.loadUseLiquid(SC_MAP_LOADED) end

4. What happened to Itemsyndrome? Aka "unit equips item, item adds a syndrome/interaction to unit". That one was extremely interesting to modders.

1.
Spoiler (click to show/hide)

2. Don't like messing with tiletypes: You need to figure out A LOT of corner cases (e.g. if the tile is in some vein, if it has itles below, if it has above etc...)

3. I tidied it up a little. However can't test it yet. Also if it shows errorlog it would be helpful if you pasted it.
Spoiler (click to show/hide)

4. Have no idea :P

296
Utilities and 3rd Party Applications / Re: DFHack 0.42.06-r1
« on: May 11, 2016, 12:33:19 am »
What exactly's it missing? Digging?
It only has: construction (with only carpenters workshop), tree cutting, item-based buildings (e.g. coffin and coffers etc...)
I'm sure eventually we'll have everything else. And the dissapearing buildings and items are confirmed bug (each time you sleep time advanced by <your current world age> :D)

297
Utilities and 3rd Party Applications / Re: DFHack 0.42.06-r1
« on: May 10, 2016, 11:52:04 pm »
I imagine advfort is due for an overhaul, to see what sort of stuff we can improve from the interface it uses, it would be nice if we could merge it into the building interface for adventurer mode to some extent but that will probably require more capable gui wizardry.

Things like workflow and stocks will need a full overhaul I assume.
I was hoping to drop advfort support, but after playing some df it seems like I can't do it yet. However it's too soon to tell if merging would be possible. I would guess it's unlikely but we'll see.

298
Also it does not help any way to twbt-rendermax compatability.

Why? Well, not exactly "compatibility", but if we just pass the required data to the shaders and perform further calculations there, we could combine them in one plugin/set of shaders. Or maybe it could even be separate plugins each adding some data to send to shader stage, and several separate shader source files defining rendering/postprocessing stages.
That might work. Has anyone done any asking around how many people will have the hardware for this?

299
Utilities and 3rd Party Applications / Re: DFHack 0.42.06-r1
« on: May 04, 2016, 11:16:21 pm »
@roses there is block-local item storage that MUST be up-to-date. It has item ids and you can get items quicker that way.

300
Since someone necroed this thread.

Shaders is the way to go. In the iOS app I recently changed it to render background colours, tiles, and shadows all with one OpenGL call and just simple shaders. I'd be interesting to finally create a shader-based renderer for desktop DF, so that the shader code could be easily modified for different effects.
And also to abadrausar: it would help a bit but main thing that is slow is reading shit-ton of memory (even slower- sending said data to gpu) each frame. Also it does not help any way to twbt-rendermax compatability.

Pages: 1 ... 18 19 [20] 21 22 ... 75