Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 5 6 [7] 8 9 ... 41

Author Topic: ☼Kobolds☼ - Everything Kobold Mode  (Read 105490 times)

Mithril Leaf

  • Bay Watcher
    • View Profile
Re: ☼Kobolds☼ - Everything Kobold Mode
« Reply #90 on: June 18, 2014, 12:07:58 pm »

Regarding the Breeding Warren, would it be possible utilize some of the catplosion code in order to produce babies in a timely fashion. I was thinking something like the idea here: http://www.bay12forums.com/smf/index.php?topic=121451.msg4169380#msg4169380.

EDIT: What are the limits on a workshop's ability to do something to a creature? It can't select a script target right?
I'd love to use it, but the catsplosion is a precompiled dll. I cant change it to kobolds... but if I can find someone who can compile the C++ script, I could try. :) Or spawn children somehow, that would also make sense.

Yes, it can select a script target, I do that all the time ;)
Looking at the code on the github, it looks like a (relatively) simple matter of tossing an impregnate and set pregnancy time to 0 onto a script that targets the worker, possibly after turning them into a woman. It could very well be far more complex than that, but it shouldn't be too hard. Even if you need to compile a new create baby DLL, it shouldn't be too painful.
In that case: Congratulations Mithril Leaf, you have been chosen to be the kobold-baby-maker. Good luck. ;)
Alright, don't expect anything soon, but I'll try and toss something together in the next few days. Gonna have to actually learn the variable names that DFHack uses for pregnancy, that'll be !!FUN!!. It won't be pretty, but I should be able to cobble something functional together. I will also assuredly need some help eventually, but that could probably go in the DFHack thread for more generic stuff.
If it goes well though, I might be able to toss one together that lets you do the same on pets. No promises there.

EDIT: Can you send me some sample code that one would use to run a script on the unit in the workshop? Or point me to which lua script I should look at. That might be better even.
« Last Edit: June 18, 2014, 12:23:22 pm by Mithril Leaf »
Logged

palu

  • Bay Watcher
    • View Profile
Re: ☼Kobolds☼ - Everything Kobold Mode
« Reply #91 on: June 18, 2014, 12:28:54 pm »

Autosyndrome, or whatever it's called these days.
Logged
Hmph, palu showing off that reading-the-instructions superpower.
The internet encourages thoughtful, intelligent discussion and if you disagree I hate you.

Mithril Leaf

  • Bay Watcher
    • View Profile
Re: ☼Kobolds☼ - Everything Kobold Mode
« Reply #92 on: June 18, 2014, 12:39:11 pm »

Autosyndrome, or whatever it's called these days.

That's the obvious one, but I was hoping I could get an example using lua so I could steal become inspired by the code.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: ☼Kobolds☼ - Everything Kobold Mode
« Reply #93 on: June 18, 2014, 01:00:46 pm »

AutoSyndrome triggers the command, it just runs the script. SYN_CLASS:siren would for example simply enter "siren" into the dfhack console. Thats it. /WORKER_ID targets the worker. I dont know how it would look in lua, since its also part of the pre-compiled autosyndrome plugin.
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 :::

omniclasm

  • Bay Watcher
    • View Profile
Re: ☼Kobolds☼ - Everything Kobold Mode
« Reply #94 on: June 18, 2014, 06:08:32 pm »

The toughest part about forced pregnancy (lol) is handling the genetics.

The rest would be really easy with a LUA hook.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: ☼Kobolds☼ - Everything Kobold Mode
« Reply #95 on: June 18, 2014, 06:13:21 pm »

Well, if you can make a lua script that inpregnates the worker, that would be great. (although this is a sentence that I never thought I would write, but its Dwarf Fortress... could be worse)
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 :::

Aristion

  • Bay Watcher
    • View Profile
Re: ☼Kobolds☼ - Everything Kobold Mode
« Reply #96 on: June 18, 2014, 06:35:45 pm »

Well, if you can make a lua script that inpregnates the worker, that would be great. (although this is a sentence that I never thought I would write, but its Dwarf Fortress... could be worse)

Lets not go into that then.
Logged
I kept imagining this guy go "By Armok, not the dead roaches! Oh gods the hamsters oh the dwarfmanity!"
Devotes several hours a day making vampires an endangered species.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: ☼Kobolds☼ - Everything Kobold Mode
« Reply #97 on: June 18, 2014, 06:39:04 pm »

Either that, or changing the spawnunit script to allow an age of the unit. Then I could just spawn kobold babies directly.
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 :::

Mithril Leaf

  • Bay Watcher
    • View Profile
Re: ☼Kobolds☼ - Everything Kobold Mode
« Reply #98 on: June 18, 2014, 08:52:28 pm »

Well, if you can make a lua script that inpregnates the worker, that would be great. (although this is a sentence that I never thought I would write, but its Dwarf Fortress... could be worse)

Done. Go to Dwarf Fortress/Dwarf Fortress/hack/lua/plugins/dfusion/tools.lua.
Lines 151-178.
Code: [Select]
function empregnate(unit)
if unit==nil then
unit=dfhack.gui.getSelectedUnit()
end
if unit==nil then
error("Failed to empregnate. Unit not selected/valid")
end
if unit.curse then
unit.curse.add_tags2.STERILE=false
end
local genes = unit.appearance.genes
if unit.relations.pregnancy_genes == nil then
print("creating preg ptr.")
if false then
print(string.format("%x %x",df.sizeof(unit.relations:_field("pregnancy_genes"))))
return
end
unit.relations.pregnancy_genes = { new = true, assign = genes }
end
local ngenes = unit.relations.pregnancy_genes
if #ngenes.appearance ~= #genes.appearance or #ngenes.colors ~= #genes.colors then
print("Array sizes incorrect, fixing.")
ngenes:assign(genes);
end
print("Setting preg timer.")
unit.relations.pregnancy_timer=10
unit.relations.pregnancy_caste=1
end
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: ☼Kobolds☼ - Everything Kobold Mode
« Reply #99 on: June 18, 2014, 09:01:46 pm »

Awesome. I will test it right away. How do I add it, and whats the command? I copy it into the tool.lua starting at line 150, and then... ?

Edit: Wait, the code already exists in tools.lua. ???
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 :::

Mithril Leaf

  • Bay Watcher
    • View Profile
Re: ☼Kobolds☼ - Everything Kobold Mode
« Reply #100 on: June 18, 2014, 09:15:19 pm »

Awesome. I will test it right away. How do I add it, and whats the command? I copy it into the tool.lua starting at line 150, and then... ?

Edit: Wait, the code already exists in tools.lua. ???

Indeed it does. That code makes a creature pregnant. It was bundled with DFusion. Just have it as a separate thing named whatever you want. Then use itemsyndrome to select the unit instead of guigetselectedunit. This is what I'm currently trying to figure out how exactly to do, but shouldn't be too hard to someone who knows what they're doing.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: ☼Kobolds☼ - Everything Kobold Mode
« Reply #101 on: June 18, 2014, 09:17:18 pm »

That is not the same as the catsplosion. Catsplosion causes the creature to instantly give birth. The dfusion empregnate takes 9 months longer.  ;)
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 :::

Mithril Leaf

  • Bay Watcher
    • View Profile
Re: ☼Kobolds☼ - Everything Kobold Mode
« Reply #102 on: June 18, 2014, 09:20:01 pm »

That is not the same as the catsplosion. Catsplosion causes the creature to instantly give birth. The dfusion empregnate takes 9 months longer.  ;)

Just set the pregnancy timer down to 1 then. Works perfectly fine.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: ☼Kobolds☼ - Everything Kobold Mode
« Reply #103 on: June 18, 2014, 09:25:43 pm »

Neat. :)

All that is needed now is to make it target the worker. ^^
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 :::

razorback

  • Bay Watcher
    • View Profile
Re: ☼Kobolds☼ - Everything Kobold Mode
« Reply #104 on: June 19, 2014, 06:10:57 am »

In regarding the "Kobolds bring their magic users in raids"-thread:

Would it be possible to set every druids anger higher in general?
I have two that are "very slow to anger" and one that "never becomes angry"... they never transformed in fighting situations.

Anyway: how do the enraged mechanics work? especially does a creature calm down after a certain time or just when there are no enemies around?
In the later case we could forgo the cooldowns and don't risk killing a druid when a fight lasts longer than one week... (if this is desired^^)
Logged
Pages: 1 ... 5 6 [7] 8 9 ... 41