Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 352 353 [354] 355 356 ... 544

Author Topic: [MODDING] 0.34. QUESTIONS THREAD  (Read 1054567 times)

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [MODDING] 0.34. QUESTIONS THREAD
« Reply #5295 on: June 23, 2013, 02:33:43 pm »

1. Make the "weapon" a part of the creature's body
2. No, but you can have it injected
3. Yeah, make it adamantine + 1 should do it

Octobomb

  • Bay Watcher
  • I like pens
    • View Profile
Re: [MODDING] 0.34. QUESTIONS THREAD
« Reply #5296 on: June 23, 2013, 02:57:47 pm »

Thanks for the prompt reply. Now, I wonder if no.2 would work if I added a liquid 'second skin' - both skins would be indestructible and the liquid skin would carry the syndrome. Any tips to go about this? Is there a way to force it to cover the whole body without making it the creature's blood or completely liquid? I could always do completely liquid I suppose... As long as I omit that in the description, but I'd love to know if a second skin of liquid is possible. Especially so if I could give it a regeneration rate of 0.
Thanks
Logged
I saw 5 people with fedoras in my town yesterday.
They're the special biohazard containment agent, out to deal with m'laria.
Sig
Bay12's resident tea drinkers

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [MODDING] 0.34. QUESTIONS THREAD
« Reply #5297 on: June 23, 2013, 03:06:20 pm »

I would just go with injection for all the attacks...

Yeah, liquid skin is possible

Octobomb

  • Bay Watcher
  • I like pens
    • View Profile
Re: [MODDING] 0.34. QUESTIONS THREAD
« Reply #5298 on: June 23, 2013, 03:15:09 pm »

I would just go with injection for all the attacks...

Yeah, liquid skin is possible
Putnam you are a saviour! The skin shall be liquid and invulnerable (but injections really, really don't suit the creature I am making, seeing as the syndrome causes you to instantly turn into red mist). Thanks for the help.
Logged
I saw 5 people with fedoras in my town yesterday.
They're the special biohazard containment agent, out to deal with m'laria.
Sig
Bay12's resident tea drinkers

Grim Portent

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.34. QUESTIONS THREAD
« Reply #5299 on: June 23, 2013, 04:15:17 pm »

I have two questions:

1) Is it possible to modify bone so that you can build using it? I tried altering the material RAWS for it and can't seem to achieve the desired effect.

2) How can I add a feathery frill to a creature? I'm not quite down with the creature RAWS yet, I know enough to build a poisonous snake man but not enough to give him a frill.
Logged
There once was a dwarf in a cave,
who many would consider brave.
With a head like a block
he went out for a sock,
his ass I won't bother to save.

mattychan

  • Bay Watcher
  • Less than dabbling DF Modder
    • View Profile
Re: [MODDING] 0.34. QUESTIONS THREAD
« Reply #5300 on: June 23, 2013, 06:32:54 pm »

How would one go about forcing clothes by gender? I have an odd feeling about males in thongs and mini skirts...
Logged
If I ask a dumb question, please tell me. So we can bond over it.
Clearly egotistical. Moon Elves Rule!

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: [MODDING] 0.34. QUESTIONS THREAD
« Reply #5301 on: June 23, 2013, 06:54:48 pm »

How would one go about forcing clothes by gender? I have an odd feeling about males in thongs and mini skirts...
Not possible right now. You can't set clothing per caste or per body parts, only per entity.
Logged

Bobnova

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.34. QUESTIONS THREAD
« Reply #5302 on: June 23, 2013, 07:56:00 pm »

I searched, I found nothing I could figure out.
I did science, and got nowhere there either.

I have a creature bite, it causes syndrome that causes significant bleeding.
What I want to do is cause contact with the blood of the bitten creature (which is, by now everywhere), to cause significant bleeding.

What I can't figure out is making the infected creature's blood infectious.

My eventual goal: Dwarven Ebola.


I feel like I'm close, I've been studying how the Vampire stuff works and trying to shuffle it, without any luck. Spent some time studying the disease mod, couldn't figure out how to adapt that one either.
Any of you know how to make a bite of a creature (or the blood of a creature, if it won't effect the creature) cause infectious blood in the bitten creature?
Logged
how do I lizard Werewolf
ther seems to be a little gecko problem somehwere.
O gawd, drank all ten beers. And 3/5 of this at dinner.  I'm dronk.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [MODDING] 0.34. QUESTIONS THREAD
« Reply #5303 on: June 23, 2013, 08:03:07 pm »

CE_BODY_MAT_INTERACTION

Bobnova

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.34. QUESTIONS THREAD
« Reply #5304 on: June 23, 2013, 09:43:58 pm »

Spent the time since that reply till now trying to make it work.
Still failing horribly.
Not sure if it's the interaction or the attempt at causing the interaction.
Logged
how do I lizard Werewolf
ther seems to be a little gecko problem somehwere.
O gawd, drank all ten beers. And 3/5 of this at dinner.  I'm dronk.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [MODDING] 0.34. QUESTIONS THREAD
« Reply #5305 on: June 23, 2013, 09:44:31 pm »

Well, let's see what you've done, then.

Bobnova

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.34. QUESTIONS THREAD
« Reply #5306 on: June 23, 2013, 10:00:35 pm »

The interaction has gone through uncounted revisions. It's largely based on vampires. The trigger has seen the most abuse from me, I've tried a few of 'em.
Code: [Select]
[INTERACTION:EBOLA]

[I_SOURCE:ATTACK]
[IS_HIST_STRING_1: consumed the tainted blood of ]
[IS_HIST_STRING_2: and was cursed]

[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_REQUIRES:HAS_BLOOD]
[IT_FORBIDDEN:NOT_LIVING]
[IT_FORBIDDEN:SUPERNATURAL]
[IT_CANNOT_HAVE_SYNDROME_CLASS:WERECURSE]
[IT_CANNOT_HAVE_SYNDROME_CLASS:VAMPCURSE]
[IT_CANNOT_HAVE_SYNDROME_CLASS:DISTURBANCE_CURSE]

[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[IE_ARENA_NAME:Ebola]
[SYNDROME]
[CE_BODY_MAT_INTERACTION:MAT_TOKEN:RESERVED_BLOOD:START:0]
[CE:INTERACTION:EBOLA]
[CE:SYNDROME_TAG:SYN_CONTACT]
[CE:SYNDROME_TAG:SYN_INJECTED]
[CE_BLEEDING:SEV:100:PROB:100:BP:BY_CATEGORY:ALL:SKIN:BP:BY_CATEGORY:ALL:FAT:RESISTABLE:SIZE_DILUTES:VASCULAR_ONLY:START:1000:PEAK:5800:END:7000]
There's no source for "contact", that would have been too easy I guess.

The initial aardvark venom. It works just fine, other than not causing the bitten creature's blood to become infectious.
Code: [Select]
[USE_MATERIAL_TEMPLATE:VENOM:CREATURE_EXTRACT_TEMPLATE]
[STATE_NAME:ALL_SOLID:frozen goblin venom]
[STATE_ADJ:ALL_SOLID:frozen goblin venom]
[STATE_NAME:LIQUID:goblin venom]
[STATE_ADJ:LIQUID:goblin venom]
[STATE_NAME:GAS:boiling goblin venom]
[STATE_ADJ:GAS:boiling goblin venom]
[PREFIX:NONE]
[ENTERS_BLOOD]
[SYNDROME]
[SYN_NAME:Ebola]
[SYN_AFFECTED_CLASS:GENERAL_POISON]
                                          [SYN_IMMUNE_CREATURE:GOBLIN:ALL]
[SYN_INJECTED]
                                          [SYN_CONTACT]
[CE_BLEEDING:SEV:100:PROB:100:BP:BY_CATEGORY:ALL:FAT:RESISTABLE:SIZE_DILUTES:VASCULAR_ONLY:START:600:PEAK:5800:END:7000]
[CE_BODY_MAT_INTERACTION:MAT_TOKEN:RESERVED_BLOOD:START:0]
                                          [CE:INTERACTION:EBOLA]
[CE:SYNDROME_TAG:SYN_CONTACT]
[CE:SYNDROME_TAG:SYN_INJECTED]

I expect I'm missing something small and stupid, that's what it feels like.
I am, fairly obviously, a total noob when it comes to DF modding.
Logged
how do I lizard Werewolf
ther seems to be a little gecko problem somehwere.
O gawd, drank all ten beers. And 3/5 of this at dinner.  I'm dronk.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [MODDING] 0.34. QUESTIONS THREAD
« Reply #5307 on: June 23, 2013, 10:03:53 pm »

Post errorlog.

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: [MODDING] 0.34. QUESTIONS THREAD
« Reply #5308 on: June 23, 2013, 10:11:27 pm »

Does dfhack.settimeout actually work in Lua code?  I've tried to adapt the way Putnam was using it for his growth size bug fix, and nearest I can tell it's not working in my script at least.  The script runs once at DF startup (I put it in dfhack.init), and the debugging text never fires after that point.  For reference, here's the code:

Code: [Select]
local args = {...}

function count_children(unit_id)
local children = 0

for key, value in pairs(df.global.world.units.all) do
if value.relations.mother_id == unit_id then
children = children + 1
end
end

return children
end

function terminate_pregnancy(unit)
if unit.relations.pregnancy_timer > 0 then
unit.relations.pregnancy_ptr:delete()
unit.relations.pregnancy_ptr = nil
unit.relations.pregnancy_timer = 0
unit.relations.pregnancy_mystery = -1
return 1 -- Terminated a pregnancy
end

-- Wasn't pregnant
return 0
end

function family_planning(children_min, children_max)
local terminated_pregnancies = 0

for key, value in pairs(df.global.world.units.all) do
local children = 0

-- Only married females matter
if (value.sex == 0 and value.relations.spouse_id ~= -1) then
children = count_children(value.id)
end

math.randomseed(value.id)
local maximum_children = math.random(children_min, children_max)
local caste = df.creature_raw.find(value.race).caste[value.caste]
local menopause_age = math.random(caste.misc.maxage_min * 0.66, caste.misc.maxage_max * 0.66)
local age = df.global.cur_year - value.relations.birth_year

if age > menopause_age or children > maximum_children then
-- This is awkward syntax, but I have no idea how to pass local values by reference in Lua
terminated_pregnancies = terminated_pregnancies + terminate_pregnancy(value)
end
end

print("Terminated " .. terminated_pregnancies .. " pregnancies.")
end

if df.isnull(args[2]) then
print('You did not specify two parameters, so a child cap of 2-4 is assumed.')
args[1] = 2
args[2] = 4
end

function apply_family_planning()
family_planning(tonumber(args[1]), tonumber(args[2]))
dfhack.timeout(1, "months", apply_family_planning)
end

apply_family_planning()

Ignore the fact that I'm doing unsafe things with the random number generator.
Logged
Through pain, I find wisdom.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [MODDING] 0.34. QUESTIONS THREAD
« Reply #5309 on: June 23, 2013, 10:16:19 pm »

Try making it 100 ticks or something.

Also, you aren't in the DFHack thread :P
Pages: 1 ... 352 353 [354] 355 356 ... 544