Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 ... 61

Author Topic: [SUGGESTIONS] for DFhack plugins  (Read 143352 times)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [SUGGESTIONS] for DFhack plugins
« Reply #15 on: January 08, 2013, 05:40:53 pm »

Already possible with scripting. See http://www.bay12forums.com/smf/index.php?topic=91166.msg3934299#msg3934299
This is what i was talking about. Possible with scripting is not same as possible for mod usage. This again needs some system to call a script (with or without params) on some event.
As for the rest of it i'll try to give some implementation examples later (both for modders and dfhackers)

Yes, this is the main point of this thread. I saw the code in the dfhack thread as well, and might be able to copy an old lua script and add these lines and get it to work. But only as a dfhack command. The imporant part is to run it ingame, simply by running a reaction with a dwarf. A template would be very helpful, in which we could see how it is set-up. "Plugin checks for reaction-example-name-here and runs script-name-here"... Modders know the raws, and coders know the plugins, we just need a connection between the two. :)
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 :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #16 on: January 08, 2013, 05:44:33 pm »

Well, I'm working on that connection being me.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [SUGGESTIONS] for DFhack plugins
« Reply #17 on: January 08, 2013, 05:53:26 pm »

Quote
Portal buildings. Enter building #1, worker is teleported to building #2
- Possible: YES
 - Quickly travel across the map.
 - Reinforcements for deep layers, like the circus.
 - More tactics, ambush invasions yourself.
 - Enter otherwise walled-off areas, without opening doors for enemies.
This one was intended for military purposes, I think adding it to the pathfinding of the game, so that haulers would use it, is way to tricky. I was mostly thinking of these deep curious underground structures, with the squads barely making it to the lower levels before turning around for a drink/meal. Or fighting in the third cavern/circus.

Quote
Cavern Embark
- Possible: YES
 - Teleport starting group into the caverns, then run revflood.
 - Wagon, pets and the 7 embark dwarves spawn in the first cavern instead of the surface.
A question about that one: How could we possibly give the player an option for this before he embarks ? It would run as soon as fortress mode starts, so I dont know how that could be implemented. Adding a dfhack option at the embark screen (the one in which you select dwarves, pets, items) and have a line of text saying: Cavern Embark: Yes/No, hotkey "c"... falconnes plugins come into mind, with the added commands and texts in the stockpiles.

@Putnam: Good to hear :) Me too, although probably in different ways.
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 :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #18 on: January 08, 2013, 06:41:39 pm »

I'm pretty sure that changing race is fully possible--in fact, Friendship is in the current version of DFHack and it works in full. You just have to edit the txt file included with it, races.txt.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [SUGGESTIONS] for DFhack plugins
« Reply #19 on: January 08, 2013, 06:51:24 pm »

But how to target creatures with it? It would need to be triggered by a dwarf in fort mode, and target a specific creature in a cage. I know you can use full cages for reactions, but as soon as the dwarf picks up the cage, he releases the prisoner...
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 :::

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #20 on: January 09, 2013, 01:37:21 am »

https://github.com/warmist/dfhack/blob/master/Lua%20API.rst#id56

I'm thinking triggering on specific reaction (it has limitation that reaction must produce something (e.g. something worthless)) and then searching a cage near to the building and then running some lua that would change civ (maybe modify hist fig so it does not have "enemy to this group" entries and add "member of this group"). "Friendship" is required for different races to do jobs in fort, but e.g. catching trolls and using them as cannon fodder is possible without using Friendship (which btw needs some work >.>)

onProjItemCheckImpact-> allows exploding (or something other you could think of) on hit of any projectile (including siege weapons)
onItemContaminateWound-> allows triggering on weapon contaminating a wound (which is afaik almost always it hits) so magical weapons are possible and/or weapon wear.

https://github.com/warmist/dfhack/blob/master/Lua%20API.rst#id61

This is added by ag and is the way you could "bind" those triggers to actions (i could help tweak, explain and write some of the effects). The mod should have it's own init.lua in raws dir (thus get copied when you create a world. It allows automatic loading/unloading of triggers/actions etc... (you would not want them to mess up the worlds without mod or with different mod)

edit: forgot this one:
onReactionComplete -> allows detecting/editing when reaction finishes thus allowing optional items based on skill, failing based skill (or lack of) transmuting materials in some strange way (e.g. if reagent A is mat X and reagent B is mat Y make the product mat Z), also messing with unit making the reaction (adding skill, changing traits, adding syndromes, killing/healing, making him a ghost etc...)

And other note: ghost can do jobs according to testing in advfort so using expwnent event system, when a new job is created you could check reaction name and assign a ghost to it. It might work in fort mode too.
« Last Edit: January 09, 2013, 01:42:48 am by Warmist »
Logged

CheatingChicken

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #21 on: January 09, 2013, 05:24:42 am »

What about buildable Aquifers? For example constructions from specific materials, that act as an aquifer once built (Or even a magma aquifer, if that is even possible at all)
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [SUGGESTIONS] for DFhack plugins
« Reply #22 on: January 09, 2013, 05:30:41 am »

We have a big list already, and some things apparently work quite easily, since code has been posted already.

How about we take one item from the list, lets say the "triggering megabeasts/titans/fbs", because the lines of code are done, and put them in a plugin that checks for any reaction with a keyword to be run. Whenever REACTION:MEGABEAST_name is run, you trigger the script. Then we could test it out in fortress mode, and see the code behind it that links ot to buildings ^^
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 :::

narhiril

  • Bay Watcher
  • [DUTY_BOUND]
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #23 on: January 09, 2013, 04:52:25 pm »

Here's one I'd really like: something that checks a material for a contact syndrome of [SYN_CLASS:/EQUIP] and then - 1) applies it whenever an item of that material is equipped by a valid target - 2) removes it when the item is no longer equipped.

In case this isn't ever implemented.
« Last Edit: January 09, 2013, 05:05:49 pm by narhiril »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [SUGGESTIONS] for DFhack plugins
« Reply #24 on: January 09, 2013, 07:34:29 pm »

Quote
Coat items with materials, which affect the wearer
is in the first post. I guess your solution is the better one, directly making the item from the material. :)
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 :::

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #25 on: January 10, 2013, 06:35:27 pm »

Oh btw it's possible to edit veins (e.g. change material type (only to inorganic), add tiles to it, remove tiles, create new veins)

peregarrett

  • Bay Watcher
  • Гномовержец Enjoyed throwing someone recently
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #26 on: January 11, 2013, 02:10:04 am »

Oh. How I could forget?
A workshop to replace lost limbs with artificial ones! Urist McSteelHands, aint that great? Or Urist McRubyEye.

Could be possible with transformation syndrome into castes DWARF:MALE_STEEL_RIGHT_HAND/STEEL_LEFT_HAND/etc, but it's not elegant solution.
I guess it should consist of reaction that makes a gas with 1-sec transformation into something and back to heal lost limbs, and a plugin that remembers the lost limbs before and changes the material of restored limbs afterward.

Is it possible to affect speed, strength and such depending on quality of artificial limb?
Logged
Did you know that the Russian word for "sock" is "no sock"?
I just saw a guy with two broken legs push a minecart with a corpse in it. Yeah.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [SUGGESTIONS] for DFhack plugins
« Reply #27 on: January 11, 2013, 04:19:09 am »

@peregarrett: I dont think thats possible, or reasonably easy to do. I would know no way of modding or flags that would allow this, but better wait for warmist, expwnent, quietust or someone else more knowedgeable to answer.

@warmist: I actually cant think of an implementation of this in a mod. Changing veins would only result in getting either new gems, boulders or ore, which can all be done by conventional modding.
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 :::

peregarrett

  • Bay Watcher
  • Гномовержец Enjoyed throwing someone recently
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #28 on: January 11, 2013, 04:59:50 am »

Oh btw it's possible to edit veins (e.g. change material type (only to inorganic), add tiles to it, remove tiles, create new veins)
Oh. The creature that changes tiles on its trail. Like Shai-Hulud from Dune.
Also, the creature that can "dig" its way through stone - it spatters surrounding walls with special slime, and script auto-replaces them with floor tiles.


Logged
Did you know that the Russian word for "sock" is "no sock"?
I just saw a guy with two broken legs push a minecart with a corpse in it. Yeah.

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #29 on: January 11, 2013, 05:03:28 am »

@peregarrett: I dont think thats possible, or reasonably easy to do. I would know no way of modding or flags that would allow this, but better wait for warmist, expwnent, quietust or someone else more knowedgeable to answer.

@warmist: I actually cant think of an implementation of this in a mod. Changing veins would only result in getting either new gems, boulders or ore, which can all be done by conventional modding.
first one might not be possible (same race unit can't have different materials for it's body parts) might be wrong though...
second one: i was thinking of a shrine to the god that regrows some veins around him. Or an evil (maybe unminable) veins that grow if something bad happens (trapping everything inside)
Pages: 1 [2] 3 4 ... 61