Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 162 163 [164] 165 166 ... 360

Author Topic: DFHack 0.43.03-r1  (Read 1120736 times)

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2445 on: April 10, 2015, 04:18:07 am »

Wouldn't it be easier to spawn nine tiles of magma under where you plan to put the magma forte?
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2446 on: April 10, 2015, 04:38:50 am »

Spawning magma with liquids doesn't actually allow you to make magma forges.

Boltgun

  • Bay Watcher
  • [UTTERANCES]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2447 on: April 10, 2015, 05:35:22 am »

To unlock magma forges you need an 'underground water' or volcano pipe features on the map to mark as discovered so I guess there is no way to enable them on a site without any.

Feature script

Perhaps you can generate a feature and inject it into df.global.world.features.map_features, and perhaps it won't crash the game.
« Last Edit: April 10, 2015, 05:38:33 am by Boltgun »
Logged

ancistrus

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2448 on: April 10, 2015, 06:51:20 am »

To clarify, I was exerimenting with making a fort that would keep the highest framerate possible.
Logged

Snergler

  • Bay Watcher
  • The world is the same as ever.
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2449 on: April 10, 2015, 11:44:19 am »

I think that tiletypes can be used to enable magma workshops, by painting an tile with the MAGMA material. you can use the FLOOR shape(you might have to make the tile visible with HIDDEN 0) then use gui/liquids to fill the hole with lava.
Logged

breadman

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2450 on: April 10, 2015, 02:53:15 pm »

Regarding the stockflow plugin, perhaps it would be easier to make it work more like workflow that's tied to a stockpile (having read a separate thread about the difficulty of having stockpile generate jobs in connected workshops)?
Instead of using job manager, stockpile will suspend/resume relevant job in the "Take from" workshops. Then each stockpile can "borrow" the workflow's interface to set up a set number/stacks of items to maintain in the stockpile.

Instead of having stockpile "create" the job, require user to create a job on repeat in the linked workshop. The stockflow UI can indicate if it can detect a relevant job it can control in the linked workshops.

There's an interesting idea in here, but I really don't like most of the details.  As it stands, I don't see how this idea improves upon workflow itself.  Particularly since it relies on all three of the most complicated parts of workflow.

Stockflow was originally intended as a proof of concept for an idea proposed for inclusion in the base game.  That's the only reason the bookkeeper is involved in its default mode.  That's also why the UI is limited to one or two lines in the stockpile screen, and an almost exact duplicate of an existing screen.

It also happens to predate workshop links, and you're right that workshop links could be a very interesting way to automatically suspend and resume jobs in a workshop.  However, it's much harder than it sounds to determine which jobs are relevant, so I would be more inclined to suspend and resume all jobs in the linked workshop.

So, the core idea, which actually would be simpler than stockflow:  A single line on the stockpile screen (tentatively "A: Automate Selected"), when the selected stockpile link points to a workshop, toggles a flag on that link's line (like the R and S flags on workshop jobs).  Every so often, each workshop with any flagged links checks those linked stockpiles.  If any input stockpiles are empty, or all output stockpiles are full, then all jobs in the workshop are suspended; otherwise, all suspended jobs in the workshop are resumed.

This might cause problems for a job actively in progress when the workshop is checked, which could perhaps be mitigated by running the check every single tick.  Similarly, it doesn't prevent workshop jobs from getting cancelled, though checking every single tick could reduce the likelihood.

And therein lies the problem.  The point of stockflow is to set up each stockpile once, and never worry about it again.  I don't want to deal with jobs disappearing from workshops, which is why I like having the manager create new ones every so often.  Then again, flagging links would give me control over which workshop handles which job, at the expense of requiring a separate workshop for each job.  (Yes, relevance could eliminate that requirement, but face it, I never got around to determining for certain whether an item on the ground is truly stockpiled correctly, and that's only half of the problem.)

Overall, I don't think I'm going to write such a plugin, and I would be opposed to modifying stockflow to be more like workflow, but if you want to write a third stock management plugin, be my guest.
Logged
Quote from: Kevin Wayne, in r.g.r.n
Is a "diety" the being pictured by one of those extremely skinny aboriginal statues?

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2451 on: April 11, 2015, 12:49:58 am »

Mmph. Just managed to successfully teleport an army into my fortress.

The game promptly crashed.

(This is how I knew that I actually managed to teleport them into my fortress)

EDIT: HOLY SHIT I JUST FORCED A SIEGE
« Last Edit: April 11, 2015, 12:59:29 am by Putnam »
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2452 on: April 11, 2015, 12:59:07 am »

Yeah, I got the hang of moving myself around but I'm leery of trying to do it to another army for exactly that reason.

Could try to put them on a tile near your borders maybe?

Edit response: so you're what now... a double wizard?
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2453 on: April 11, 2015, 01:00:49 am »

unk_pos2 refers to the tile that they will go to next, so I put them on the border with them moving into a tile that happens to be inside my fortress.

World tiles have 17x17 region tiles have 3x3 army tiles, btw.

To my surprise, they actually besieged the place. Holy crap. Imma see if I can figure out a way to get these results consistently (all in all, it was about 5 minutes of fiddling with unk_pos2 and the controller's positions until it stopped teleporting them)
« Last Edit: April 11, 2015, 01:03:07 am by Putnam »
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2454 on: April 11, 2015, 01:02:31 am »

Nice, I was thinking the pos2 might do that!
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2455 on: April 11, 2015, 01:35:46 am »

What state were the unk_48 flags in? I dropped 100 gobs on my fort as an adventurer but they're non-hostile.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2456 on: April 11, 2015, 01:55:58 am »

Here's what I got.

Code: [Select]
function isGoblinEntity(entity_id)
    return df.historical_entity.find(entity_id).entity_raw.code=='EVIL'
end

function forceIt()
    for k,v in ipairs(df.global.world.armies.all) do
        if v.controller and v.controller.entity_id~=-1 and isGoblinEntity(v.controller.entity_id) then
            local fortress=df.world_site.find(df.global.ui.site_id)
            local entry_position={x=(fortress.global_min_x*3),y=math.floor((fortress.global_min_y+fortress.global_max_y)*1.5)} --x*1.5 more properly x*3/2, but same thing
            v.unk_pos1.x=entry_position.x-1
            v.unk_pos2.x=entry_position.x+1
            v.unk_pos1.y=entry_position.y
            v.unk_pos2.y=entry_position.y
            v.controller.pos_x=v.unk_pos1.x
            v.controller.pos_y=v.unk_pos1.y
            if #v.unk_pos_x>0 then
                v.unk_pos_x[0]=v.unk_pos2.x
                v.unk_pos_y[0]=v.unk_pos2.y
            else
                v.unk_pos_x:insert('#',v.unk_pos2.x)
                v.unk_pos_y:insert('#',v.unk_pos2.y)
            end
            print('Diverted Army #'..v.id..' to fortress')
            return true
        end
    end
    return false
end

forceIt()

It ain't workin. What'd you do?

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2457 on: April 11, 2015, 02:36:17 am »

I uh, didn't do wizardry, I just pulled up gui/gm-editor df.global.world.armies.all as an adventurer and found where my home fort was (right around 440 by 389) then I found where an army with the goblin race number under unk_2c was, the first entry seems to be the count so I set that to 50, moved the controller over to my fort along with the gobs and uh...
Spoiler (click to show/hide)

That definitely looks siege-y to me.

Oh yeah, the first army zooped back to the controller, the non-hostile one, so I found one that was due to move next tick, that might have been part of why it worked out so well.

Tried to play around with different variations of the same trick in fortress mode, works fine as an adventurer, but in fort mode they just don't appear on map that way, even checked by grabbing one of my dorfs and making them an adventurer and there were asterisks on top of the fort when I went to travel outside, while the ones I had set next to it to move towards the fort were just chilling out.
« Last Edit: April 11, 2015, 03:14:50 am by Max™ »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2458 on: April 11, 2015, 05:13:15 pm »

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2459 on: April 11, 2015, 06:12:50 pm »

Oh, sorry, uh, this:


474 is the dorf race in the mod I'm using, 477 being goblins, unk_0 gave me the number of units, one army I moved near me had two sleeping gobs in it with two entries under unk_2c so I put the unk_0 to 50 in each and ended up with a 3x3 tent that had 100 sleeping gobs in it. Couldn't get them to react normally so I grabbed an army that was about to move and did the same thing, ended up with ~50 gobs sieging my fort in adventurer mode.

Couldn't get the same trick to work in fortress mode though.
Logged
Pages: 1 ... 162 163 [164] 165 166 ... 360