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 ... 8 9 [10] 11 12 ... 75
136
Well I'd also like to know how to keep the pointers stored in DF-structures, so they can be updated for newer versions.

I don't think df-structures have support for storing addresses of and/or calling arbitrary functions (as opposed to vmethods).

Btw, I'm just using viewscreen_image_creatorst to make it load all art_image_chunks.

Actually you can store "void" pointers in symbols.xml: both start_dwarf_count and twbt_render_map are void pointers with no type and into a code region. However these are not automated and afaik harder to find then other offsets

137
Hey could someone look into how wounds work/get updated. I know there is some "calculated_XXX" flags but they did not seem to work when i removed brains from a dwarf (it should get him paralyzed?). I know that heart could be removed without any problems so maybe some info on how much bleeding should be correct for specific organ? Or just wound workings info would be appreciated.

138
Warmist, now all we need is rendermax in twbt for fancy lighting. Do it! :P
I've tried to understand why it did not work, and what needed to be done to work and failed :|
is there a problem with taking twbt-rendered output and slapping calculated separately output of rendermax light engine on it as semitransparent mask of proper color (essentialy, just another tile override)?
Not really, just a problem of it's two very separate plugins. I've already done some work so that rendermax could be moved to a module and used by any other plugin (probably it would only be useful for twbt though). Also i've started redoing the lighting engine calculations so not sure in what state i left it :?

139
Utilities and 3rd Party Applications / Re: Dwarf fortress multiplayer
« on: January 11, 2018, 01:50:09 am »
Ah... sad: current dfhack has some bugs, one of them makes it so i can't track kills thus no money -.-
What specifically is the issue? Is it something that hasn't been fixed on the develop branch?
https://github.com/DFHack/df-structures/issues/234

140
I kind of want to get an old iPad to play DFRemote.
Yeah me too.

Or develop an android soft with mifki's server. However i HATE phone apps : <

141
Would be really hard to do, considering that most tiles above a fort are solid, unrevealed rock.

That is easy: don't draw unrevealed tiles. The hard part is e.g. if it's dug out space. What then? You could make area around the cursor transparent but again...

Imho it needs some visual effect to make it useful.

142
Warmist, now all we need is rendermax in twbt for fancy lighting. Do it! :P
I've tried to understand why it did not work, and what needed to be done to work and failed :|

Also currently i have mutilated the rendermax to make a opencl powered monstrosity (which worked btw) but then wanted MORE and now too lazy to put it back together...

143
There's build-windows.bat file in which you can just set path to dfhack and its version.

Ah, yep, thanks, got the vcxproj file set up with the paths and everything is good, I should have at least figured that out from the variables in the vxcproj file, sorry to trouble you.

Since you know way more about this than me, do you think it is possible (if I were to somehow gain the knowledge to do this on my own without bothering you) to render levels above you while having clickthrough to the current level?

The more I look at memory patching the more I realize that I have little hope of achieving this without being a huge pain the ass with more questions, but I'm willing to silently slog through it if it's possible.

It's really simple It could be done like this:
  • You need to do something when game wants to render the game view, for that we use vmethod interposing: e.g. This gets called (instead) when fort-mode view is rendering
  • Set window to where you want to render (e.g. in this case z+1)
  • In that function you need to call "df-render-map" function, which mifki found.
  • Read the screen and save it(?)
  • Call original vmethod to perform "real" render
  • do something with saved screen (e.g. somehow blend the tiles?)
Another example with rendering (in dfhack tree) here

Sorry if it's not twbt-like i've looked into that code quite long ago and can't quickly find relevant examples.

144
Utilities and 3rd Party Applications / Re: Dwarf fortress multiplayer
« on: January 07, 2018, 09:32:29 am »
Ah... sad: current dfhack has some bugs, one of them makes it so i can't track kills thus no money -.-

Edit: Started server on old df with old dfhack. No difference for this part of multiplayer... Fort mode might be more interesting with new version (e.g. if i somehow allow players to do their own raids?)

145
I remember in the old days people tried to get a fortress with 50+ years as moss would grow up everywhere...it is a thing yet, btw?
I was ecstatic when i noticed first tile of moss in one of my forts... But it was sooo long ago...
PTW btw :) epic story and fort.

146
Utilities and 3rd Party Applications / Re: Dwarf fortress multiplayer
« on: January 07, 2018, 04:20:43 am »
* Warmist is inspired by FREAKING 400 YEAR FORT *

Server on-line... Thinking how to make a 400 year multiplayer fort :D Might need to think of a way to have more indirect control because fort fps would be low.
Arena mode for now (just new version check).

Edit:
  • Added saving for unit creation. Uses localstorage. Double click on the name to show saved names (not sure why it works like that on firefox?)

147
I think I'm all setup to develop my cxxrandom plugin now, but I'm unsure how to import plugin functions into a lua script.
require('plugin.<name>') seems to be the correct syntax for importing, although the docs specify mkmodule('plugin.<name>') which did nothing but complain with errors.

The next step would be to give a shot at calling a function from a plugin. I can't seem to do that, so I'm guessing I'm either trying wrong or I imported the plugin incorrectly. I'm testing with the burrows plugin. Can somebody tell me how this is supposed to work?

I think it needs something like this: almost empty lua file to work. Don't know the exact reason why though...

148
Holy hell there's a new version of DF! Haha, I had no idea.

Thanks my dude. I think I'll get started tomorrow afternoon. I got it downloaded, but I'll get to reading the compile doc and find that skeleton file. I checked out a few of the plugins while you were typing your reply and they seem to be following different standards and practices. rename.cpp seems pretty solid though, and fastdwarf.cpp#L248 seems handy too. I'm sure the skeleton file will clear some things up.

I wonder if I can figure out how by reading up on the TWBT source code (I assume it is available). If not I may want some elaboration on "online Continuous Integration thing" cause the search results on google are dubious.

Twbt stuff: repo
About plugins: see this file the ones using Lua are more towards what you want. Some plugins do init/deinit stuff, some don't have any state and only add a command to dfhack. Yours should probably only export some lua functions.
As for CI I used this: Appveyor . Still suprised that someone could spare the cpu time needed (and disk space) for stuff like this - FOR FREE...

149
I want to develop a dfhack plugin to export functions for random number generation.

The C++ random number distributions are looking quite appealing for a lua script I'm developing. There are some table entries I need to randomly select. I want to exhaust all selection options, randomly, in the fewest iterations necessary. So a std::uniform_int_distribution would be quite fitting for this task. Even creating a custom number distribution would be easier written in C++ over lua. A custom number distribution wherein: I create an array of my selection options (ie. a bunch of indices), then shuffle the array to a random order, and finally "generate" numbers by iterating through it.

I've looked over dfhack documentation, but there doesn't seem to be anything covering the creation of plugins. I've never worked with lua before last week, so I'm not even sure how exporting functions works.

  • How can I get started?
  • Do plugins require dfhack source files to integrate/build?
  • Do I need to clone the entire repo? If so can anybody point me to a thread that covers getting setup? (preferrably in visual studio 2013-2017)
  • Could I instead create my plugin without any of the dfhack source files, then drop it in? I feel this would be too convenient to be possible.

So there is a module that already has Mersenne twister implemented (before we could use c++XX) in a module . It could be extended to have more random stuff exposed to lua.

On the other hand module vs plugin (AFAIK) only difference is that modules are "baked in" into main library so other plugins/modules can easily use them.

  • See: Compiling docs and Any files in here . There is also "skeleton plugin" but imho it's more complicated than it needs to be.
  • Yes and no. Yes it needs for easiest build and integration. But there are ways to compile it without compiling whole dfhack. I think only mifki (of TWBT and other cool stuff) does that.
  • Yes cloning entire repo is preferable. Currently we are in "new df version chaos" so pull-req are not being handled (afaik) and the compiling link should cover setup
  • There are ways to do it... I did it by using online Continous Integration thing, but it does full dfhack compile (30min) so developing is slow and i'm using it only when i'm too lazy to update dfhack away from from my main pc.
As always: you can post your issues in dfhack thread or on irc channel

150
Utilities and 3rd Party Applications / Re: DFHack 0.43.05-r3.1
« on: December 06, 2017, 05:11:43 am »
Note that this tools has to be used before embarking as it manipulates the data DF uses to generate the embark details.
Thanks, but I want to do it post-embark.
Creating rock out of thin air should be possible as well, and I think there are tools for that kind of manipulation, as well as morphing single tiles. There's a tool for water/magma manipulation that can also create obsidian.
Yeah, I know that tiles can be manipulated into rock/obsidian/open space/water/magma. But I'm interested in another kind of manipulation: abundant, dumb layer rock -> mineable ore. I've seen a post somewhere where it was stated that new mineral veins can be injected via DFHack, but it had no details how to do that exactly.

Ancient code warning: https://gist.github.com/warmist/11218191 but it should work on any version (?)

Pages: 1 ... 8 9 [10] 11 12 ... 75