Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 107 108 [109] 110 111 ... 120

Author Topic: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION  (Read 187897 times)

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION
« Reply #1620 on: November 03, 2019, 07:33:25 pm »

Not a clue, never heard of one specifically but it sounds like something that probably already exists. I don't actually use dfhack myself and can't write scripts for it (I've tried it hurts my brain).

Maybe ask in the dfhack thread?
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

Atkana

  • Bay Watcher
  • [CURIOUSBEAST]
    • View Profile
Re: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION
« Reply #1621 on: November 04, 2019, 02:47:18 am »

Fine then, I saw some kind of item script with special arguments for paired items... When we're at it, do you know some script to trigger when a unit of certain race is killed? I want to punish players for killing magical livestock ;D.
The eventful / EventManager module has an event that's triggered whenever a unit dies. You'd use that, combined with a check for your desired race, to trigger whatever you desired. You'd have to write a bespoke script for this, however.


Edit: Here's an example script. It prints a message whenever a unit dies, and mentions their unit id, and the name of their creature:
Code: [Select]
local eventful = require("plugins.eventful")
eventful.enableEvent(eventful.eventType.UNIT_DEATH, 1)

eventful.onUnitDeath.exampleScript = function(id)
local unit = df.unit.find(id)
local unitCreature = df.creature_raw.find(unit.race)

print("Unit " .. id .. " died. It was a " .. unitCreature.creature_id)
end
« Last Edit: November 04, 2019, 04:39:47 am by Atkana »
Logged

Ulfarr

  • Bay Watcher
  • Going on a pilgrimage to Mars
    • View Profile
Re: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION
« Reply #1622 on: November 04, 2019, 03:29:53 am »

Dfhack. Don't think there's any other way. It'll have to wait for toady to fix the issue.

Fine then, I saw some kind of item script with special arguments for paired items... When we're at it, do you know some script to trigger when a unit of certain race is killed? I want to punish players for killing magical livestock ;D.

I think Meph has a script for the gloves issue in masterwork.
Logged
Bring Kobold Kamp to LNP! graphics compatibility fix.

So the conclusion I'm getting here is that we use QSPs because dwarves can't pilot submarines.

endlessblaze

  • Bay Watcher
  • likes dragons for their fiery breath
    • View Profile
Re: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION
« Reply #1623 on: November 04, 2019, 12:10:01 pm »

Can someone tell me what im doing wrong with these materials?

I thought I had the tissues set up right but I keep getting this
Spoiler (click to show/hide)

The Body and Tissues
Spoiler (click to show/hide)

 The materials

Spoiler (click to show/hide)

I asked around on Discord, but no one could figure out what was wrong with it
Logged
Kids make great meat shields.
I nominate endlessblaze as our chief military executive!

Roses

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION
« Reply #1624 on: November 04, 2019, 12:24:09 pm »

Can someone tell me what im doing wrong with these materials?

I thought I had the tissues set up right but I keep getting this
Spoiler (click to show/hide)

The Body and Tissues
Spoiler (click to show/hide)

 The materials

Spoiler (click to show/hide)

I asked around on Discord, but no one could figure out what was wrong with it

Snipped from your creature
[USE_MATERIAL_TEMPLATE:HUMPTY_YOLK_GOO_TEMPLATE]
   [TISSUE:YOLK_GOO] Compises the main body
    [TISSUE_NAME:yolk:yolk]
    [TISSUE_MATERIAL:YOLK_GOO]
needs to be
[USE_MATERIAL_TEMPLATE:YOLK_GOO:HUMPTY_YOLK_GOO_TEMPLATE]
   [TISSUE:YOLK_GOO] Compises the main body
    [TISSUE_NAME:yolk:yolk]
    [TISSUE_MATERIAL:YOLK_GOO]
Logged

endlessblaze

  • Bay Watcher
  • likes dragons for their fiery breath
    • View Profile
Re: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION
« Reply #1625 on: November 04, 2019, 12:41:56 pm »

Can someone tell me what im doing wrong with these materials?

I thought I had the tissues set up right but I keep getting this
Spoiler (click to show/hide)

The Body and Tissues
Spoiler (click to show/hide)

 The materials

Spoiler (click to show/hide)

I asked around on Discord, but no one could figure out what was wrong with it

Snipped from your creature
[USE_MATERIAL_TEMPLATE:HUMPTY_YOLK_GOO_TEMPLATE]
   [TISSUE:YOLK_GOO] Compises the main body
    [TISSUE_NAME:yolk:yolk]
    [TISSUE_MATERIAL:YOLK_GOO]
needs to be
[USE_MATERIAL_TEMPLATE:YOLK_GOO:HUMPTY_YOLK_GOO_TEMPLATE]
   [TISSUE:YOLK_GOO] Compises the main body
    [TISSUE_NAME:yolk:yolk]
    [TISSUE_MATERIAL:YOLK_GOO]

That diden't fix anything
Logged
Kids make great meat shields.
I nominate endlessblaze as our chief military executive!

Roses

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION
« Reply #1626 on: November 04, 2019, 12:44:05 pm »

Did you fix it for both the YOLK_GOO and SHELL_GOO materials?

EDIT: Oh, also the TISSUE_MATERIAL:YOLK_GOO should be TISSUE_MATERIAL:LOCAL_CREATURE_MAT:YOLK_GOO
Logged

endlessblaze

  • Bay Watcher
  • likes dragons for their fiery breath
    • View Profile
Re: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION
« Reply #1627 on: November 04, 2019, 12:46:36 pm »

I thought Local Creature Mat was only for materials defined inside the creature file?
Logged
Kids make great meat shields.
I nominate endlessblaze as our chief military executive!

Roses

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION
« Reply #1628 on: November 04, 2019, 12:47:39 pm »

I thought Local Creature Mat was only for materials defined inside the creature file?

You are defining a material inside the creature file, you are just using a template to define the material
Logged

endlessblaze

  • Bay Watcher
  • likes dragons for their fiery breath
    • View Profile
Re: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION
« Reply #1629 on: November 04, 2019, 12:51:42 pm »

Spoiler (click to show/hide)

Still doing it

Wait no
Its a new error now

Spoiler (click to show/hide)

Progress? Maybe?
« Last Edit: November 04, 2019, 12:54:32 pm by endlessblaze »
Logged
Kids make great meat shields.
I nominate endlessblaze as our chief military executive!

Roses

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION
« Reply #1630 on: November 04, 2019, 12:56:59 pm »

Spoiler (click to show/hide)

Still doing it

Wait no
Its a new error now

Spoiler (click to show/hide)

Progress? Maybe?

Now it looks like it can't find your material templates, are you sure you are using the correct naming convention and everything?
Logged

endlessblaze

  • Bay Watcher
  • likes dragons for their fiery breath
    • View Profile
Re: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION
« Reply #1631 on: November 04, 2019, 12:58:50 pm »

I thought I was.
If you have discord I should be able to send the files over for you to have a look at them real quick. I was sure I already had all the naming errors weeded out though.
Logged
Kids make great meat shields.
I nominate endlessblaze as our chief military executive!

Roses

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION
« Reply #1632 on: November 04, 2019, 01:03:23 pm »

I thought I was.
If you have discord I should be able to send the files over for you to have a look at them real quick. I was sure I already had all the naming errors weeded out though.

I'm at work unfortunately, make sure your material template file is named with the format material_template_*
Logged

endlessblaze

  • Bay Watcher
  • likes dragons for their fiery breath
    • View Profile
Re: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION
« Reply #1633 on: November 04, 2019, 01:09:17 pm »

I had forgotten the "Template" part of the name

It recognizes them as being made of something now, and theres no error log.
But now that something is melting upon existence.

Going to have to figure that one out, and the shell ability still dosent seem to be working

But that might be because of the melting thing
Logged
Kids make great meat shields.
I nominate endlessblaze as our chief military executive!

Roses

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION
« Reply #1634 on: November 04, 2019, 01:17:22 pm »

I had forgotten the "Template" part of the name

It recognizes them as being made of something now, and theres no error log.
But now that something is melting upon existence.

Going to have to figure that one out, and the shell ability still dosent seem to be working

But that might be because of the melting thing

Check the melting, ignite, and boiling points of the materials. You also are setting the main tissues to the YOLK material which is a liquid at base temperature
Logged
Pages: 1 ... 107 108 [109] 110 111 ... 120