Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 319 320 [321] 322 323 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1457906 times)

RickRollYou2

  • Bay Watcher
  • [START_BIOME:EARTH]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4800 on: November 03, 2013, 03:58:06 am »

What would it take to change the target of the catsplosion plugin to another animal? Merely editing CAT doesn't seem to work.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #4801 on: November 04, 2013, 10:22:36 am »

Is it possible to have custom workshops require power using DFhack?
I think so. But afaik only with c++ plugin.
I'd like to second a request for a plugin like that. Something along the lines of "all buildings with NEEDS_POWER_ in their building ID, require as much power as the millstone for reactions.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4802 on: November 04, 2013, 10:47:19 am »

Ask Toady for that. Anything dfhack can do will have the same weird restrictions on build order as the steam engine.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #4803 on: November 04, 2013, 11:07:43 am »

Which means:
1. It has to be a workshop.
2. It needs to be build before the axles.
3. Axles have to be added at the top right/left corner.

Is that about it? The water access is not necessary, is it?
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4804 on: November 04, 2013, 12:04:45 pm »

Workshop and built before the axles. This quirk seems to be rather confusing to people.

This can be improved a lot if Toady can just slap 'virtual' on the method that is used to add the set of possible connection points of a building to a certain list, so that I can override that part of the code too. Currently only the action of checking the building against the previously constructed list is overridable, which leads to this weird dependency on build order.

Of course, official support for defining machine connection points and power requirement in the raws would be even better. It will help steam engine too, since it would only have to manage producing power then.
« Last Edit: November 04, 2013, 12:07:44 pm by ag »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #4805 on: November 04, 2013, 12:11:51 pm »

The workshop-only is of no consequence to the player, it only matters to the modders. If the modders make it clear that the only remaining issue is "the workshop must be build before you build the axles", then I think the players would catch the drift.

I know the deon can use this for his Fallout mod, then the Pony Fallout mod, I know I am very much looking forward to it, for a tech/steampunk race of Gnomes, Roses asked about it for his mod, and I'm sure other tech/scifi related mods like LfR or Underhive Settlement would make use of it.

I cant ask Toady to do stuff... I am still trying to muster up the courage to get baughn and lxnt together to bug Toady about the graphics/shaders.

I dont know how much work this plugin would be, but my hope is that its a copy of the Steamengine Plugin, with some lines replaced. It would really help. Please, have a try at it, or show this request around in the dfhack crew. :)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4806 on: November 04, 2013, 01:23:22 pm »

Code: [Select]
function addmilitary()
  local D=dfhack.gui.getCurViewscreen().parent.civ_idx

local grabbag=dfhack.gui.getCurViewscreen().parent.available_civs[D]
  --require("utils").insert_sorted(grabbag.positions.site,grabbag.positions.own,"id")
  grabbag.positions.site:insert("#",{new=true,entity_position})
  --grabbag.positions.own:insert("#",{new=true,entity_position})
  --local OBag= grabbag.positions.own
  --local E=dfhack.gui.getCurViewscreen().parent.available_civs[D].positions.next_positions_id
  local SBag=grabbag.positions.site
  SBag[0].flags.MILITARY_SCREEN_ONLY=1
  SBag[0].flags.IS_LEADER=1
  SBag[0].flags.DO_NOT_CULL=1
  SBag[0].flags.RULES_FROM_LOCATION=1
  SBag[0].responsibilities.RECEIVE_DIPLOMATS=1
  SBag[0].responsibilities.MANAGE_PRODUCTION=1
  SBag[0].responsibilities.TRADE=1
  SBag[0].responsibilities.LAW_MAKING=1
  SBag[0].responsibilities.LAW_ENFORCEMENT=1
  SBag[0].responsibilities.ATTACK_ENEMIES =1
  SBag[0].responsibilities.HEALTH_MANAGEMENT=1
  SBag[0].responsibilities.RELIGION=1
  SBag[0].responsibilities.TAME_EXOTICS=1
  SBag[0].responsibilities.MAKE_INTRODUCTIONS=1
  SBag[0].responsibilities.MILITARY_GOALS=1
  SBag[0].responsibilities.MILITARY_STRATEGY=1
  SBag[0].responsibilities.MAKE_TOPIC_AGREEMENTS=1
  SBag[0].responsibilities.ACCOUNTING=1
  SBag[0].responsibilities.BUILD_MORALE=1
  SBag[0].squad_size=20
  SBag[0].code="BOSSCHEEF"
  SBag[0].name[0]="BOSSCHEEF"
 
end
here's a script for patching a civ with access to military. for it to work you need to shove it into a gui lua, or remove the .parent. bit and run it normally. kinda made this for warmist spellbook script
the script doesn't work well on it's own but works great when combined with this which also needs to be stuffed into spellbook or remove the .parent.  bit to work proper use of this would be to reclaim a fort using the invader civ just to see how well they would handle your spot of land.
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4807 on: November 05, 2013, 03:04:06 am »

EDIT: Post cleared.
« Last Edit: November 06, 2013, 02:39:17 am by Urist Da Vinci »
Logged

koter

  • Bay Watcher
  • Cancels Write Post: taken by mood.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4808 on: November 05, 2013, 04:14:08 am »

Is there a way to find a retired adventurer if I cannot unretire? I have found the hamlet where I retired him (-ish), but cannot locate the unit to use bodyswap.
Logged

jeancallisti

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4809 on: November 05, 2013, 08:59:20 am »

Hi,

Where can I publish small tutorials about DFHack plugins writing?

I mean,
- DF has a wiki, but I'm too sure people are allowed to create pages specifically about DFHack.
- DFHack has a git repository, but (afaik) no Wiki.
- This forum is not the best place for readbility of formatted tutorials.

Let me know what you recommend.
For the time being I'll start from a brand new .rst file (like DFHack's readme) and host it on my Dropbox.
« Last Edit: November 05, 2013, 09:01:40 am by jeancallisti »
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4810 on: November 05, 2013, 10:00:07 am »

Is there a way to change the makeown script so that it has a time limit? (I.e. after a certain number of ticks the creature reverts to their previous allegiances). This would allow a 'charm' spell effect.

EDIT: Similarly, can this be done with the spawn script, that is, can the creature spawned with the spawn script be forced to disappear after a set time?
« Last Edit: November 05, 2013, 10:54:31 am by Roses »
Logged

jeancallisti

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4811 on: November 05, 2013, 11:16:06 am »

DFHack Plugin tutorial:
- First Draft (1.0) : here
- 05/11/2013 (1.1) : here (.rst) or here (.html , more readable)
« Last Edit: November 06, 2013, 06:40:47 am by jeancallisti »
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r3
« Reply #4812 on: November 05, 2013, 11:35:02 am »

Here is my first draft of DFHack Plugin tutorial: https://www.dropbox.com/s/059sgov0o40d4ad/PLUGIN%20TUTORIAL.rst
Some spots that need correction:
1. You have "return CR_OK;" outside of the relevant function body immediately above and below the "Simplest possible plugin: Hello World!" section.
2. In the "Create your own viewscreen" section, you mention the need to interpose vmethods. This is not necessary in this case - the only time you need to interpose is if you want to modify DF's own viewscreens (in the case of buildingplan, it is hooking into viewscreen_dwarfmodest so it can override keystrokes to invoke itself, as well as display its shortcut key labels where appropriate).

You might want to look at manipulator.cpp for a potentially simpler example of custom viewscreen implementation.
« Last Edit: November 05, 2013, 11:36:56 am by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

jeancallisti

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4813 on: November 05, 2013, 12:29:49 pm »

Some spots that need correction:

excellent. Thanks.
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4814 on: November 05, 2013, 02:20:17 pm »

The wiki has a "utility" namespace (*not* DF2012:pagename which is the default, Utility:pagename) and while there's no dfhack category yet, there really should be.

Make a page, in a similar spot to the dfhack page  and add some links.
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.
Pages: 1 ... 319 320 [321] 322 323 ... 373