Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 118 119 [120] 121 122 ... 137

Author Topic: [MODDING] 0.43.x QUESTIONS THREAD  (Read 193316 times)

Dunamisdeos

  • Bay Watcher
  • Duggin was the hero we needed.
    • View Profile
Re: [MODDING] 0.43.x QUESTIONS THREAD
« Reply #1785 on: May 16, 2017, 08:17:38 pm »

Ahhhh, I see now! Thanks for your help, both of you. I think I understand reactions much better now.

Update:
After some further tinkering, I've created my first successful custom reaction! Thanks for being supportive. :)
« Last Edit: May 17, 2017, 06:30:57 pm by Dunamisdeos »
Logged
FACT I: Post note art is best art.
FACT II: Dunamisdeos is a forum-certified wordsmith.
FACT III: "All life begins with Post-it notes and ends with Post-it notes. This is the truth! This is my belief!...At least for now."
FACT IV: SPEECHO THE TRUSTWORM IS YOUR FRIEND or BEHOLD: THE FRUIT ENGINE 3.0

ArrowThunder

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.43.x QUESTIONS THREAD
« Reply #1786 on: May 20, 2017, 12:00:10 am »

Anybody have any idea what exactly CE_ERRATIC_BEHAVIOR does? I'm having trouble testing it in arena...
If it's some way of causing temporary insanity, that'd be cool.

I'm making a number of secrets that I'll release when I'm done.
Logged

overseer05-15

  • Bay Watcher
  • Personal Text
    • View Profile
Re: [MODDING] 0.43.x QUESTIONS THREAD
« Reply #1787 on: May 20, 2017, 11:14:12 am »

Anybody have any idea what exactly CE_ERRATIC_BEHAVIOR does? I'm having trouble testing it in arena...
If it's some way of causing temporary insanity, that'd be cool.

I'm making a number of secrets that I'll release when I'm done.

It makes you act drunk- it's used in the alcohols.
Logged
adult food like, I presume, steak and potatoes and tax forms,

My game giveaway

ArrowThunder

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.43.x QUESTIONS THREAD
« Reply #1788 on: May 22, 2017, 06:01:39 pm »

Cool, thanks you two!

Another two questions:
I gave a secret a syndrome attack (it is a line-of-sight verbal attack, like the disturbance curse) that will kill when stacked enough. I added to it a syndrome with CE_ADD_TAG and added UTTERANCES and BLOODTHIRSTY, the main reason being that UTTERANCES and BLOODTHIRSTY are rarely used and afaik are never used in conjunction in vanilla. Then I created an animation interaction which required UTTERANCES and BLOODTHIRSTY. I thought that I was clever, but it didn't work at all; no corpses were target-able. My guess is that the tags added by ADD_TAG are stripped at death (or forgotten, rather), but that seems like it would break NOT_LIVING checks, so *I don't know*. I was wondering if anyone knew whether this was a case of some REQUIRES not working on corpse checks, or what. Does anyone know? Is there any way to restrict animation to recently dead creatures killed by the animator?

Okay you might disagree with my counting, but I counted that as one question xD. So here's my second question:
I've noticed people around the forums talking about using dfhack to expand capabilities when modding, and have seen some special \\commands in a couple of raw formulas people have posted. What I haven't seen is a centralized guide on how to actually do that. So... what is the syntax for using dfhack with a mod? Does dfhack just give me as a modder more tokens to use in my raws, or do I have to enumerate where I need dfhack to act somewhere else other than the raws? What is the syntax for using dfhack commands in a raw?
Logged

Amostubal

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.43.x QUESTIONS THREAD
« Reply #1789 on: May 22, 2017, 08:46:25 pm »

Okay you might disagree with my counting, but I counted that as one question xD. So here's my second question:
I've noticed people around the forums talking about using dfhack to expand capabilities when modding, and have seen some special \\commands in a couple of raw formulas people have posted. What I haven't seen is a centralized guide on how to actually do that. So... what is the syntax for using dfhack with a mod? Does dfhack just give me as a modder more tokens to use in my raws, or do I have to enumerate where I need dfhack to act somewhere else other than the raws? What is the syntax for using dfhack commands in a raw?

and thats where you leave the world of modding and enter the world of DFhack scripting.  basically you need to learn DFHack and what is already available.  Most modding through DFHack is done in the onLoad.init, onMapLoad.int, and other files that DFHack reads... you need to have DFHack loaded and then you can add triggers and other scripts to your onLoad.init that target reactions, and other events in the game and do other cool effects.

like:
modtools/reaction-trigger -reactionName STRANGEMOOD_POSSESSED_MINER -command [ strangemood -force -type possessed -skill miner ]

reaction-trigger is a command script inside the hack/scripts/modtools folder.  it takes 2 args, -reactionName {name of your reaction} and -command {what command you want to trigger when that reaction is called}]

there is all sorts of trigger commands, and in addition you can write your own scripts that have things like onJobComplete that runs a function, making all sorts of game changes... You can write scripts in ruby or lua.

But the truth is that its a crutch... there are a lot of cool things you can do inside the raws more effectively than some do in "DFHack".  Take Plump helmet Men from the the Mythical Monsters pack.  It uses syndromes and interactions to count Plump Helmet Men seen by each unit versus the number of Dwarves they see.  If a unit sees too many Plump Helmet Man he will attempt to lead a revolt, other plump helmet men may join him if they also think there are more plump helmets around than dwarves.  All of this is done by passing tags and counters through syndromes and interactions.  You could do it in DFHack mode...  Probably could do it very efficiently... but it wouldn't be the same.  The player wouldn't have to work hard to make plump helmet men see their masters, or keep them in isolated chambers...  Its work to keep plump helmet men in check... DFHacking it would make it too "program" like.

but somethings you can't do any other way and for those things... its perfect.  Want to have a building upgrade to a different building, DFHack it.  Want to make golems? DFHack it.  Want to make it rain? or snow? want a hole to hell to appear?  want to force evil blobs to be pets or dragons to be mounts of the dwarves... DFHack it!  Results may vary, crashing is not my fault.
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

krisslanza

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.43.x QUESTIONS THREAD
« Reply #1790 on: May 23, 2017, 08:52:16 am »

I thought I've seen it on the DF Wiki before, but it seems I'm wrong... do we have the raw building data of the vanilla workshops? I tried to copy one to make a variant, but when I loaded it up in Phobeus, despite using the same ASCII I saw on the wiki, my own version of a workshop came out looking completely different...

armads

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.43.x QUESTIONS THREAD
« Reply #1791 on: May 25, 2017, 07:01:43 pm »

So I've been trying to mod in butchering sentients.

I edited the ethics tokens for the dwarves to make eating them okay, and the caravans bring things like goblin meat with them.

However, I have yet to find a way to actually do this in my own fort.

Do I need to add the [pet] tag to all the other races so that they can be freely butchered?
Logged

krisslanza

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.43.x QUESTIONS THREAD
« Reply #1792 on: May 25, 2017, 07:10:00 pm »

So I've been trying to mod in butchering sentients.

I edited the ethics tokens for the dwarves to make eating them okay, and the caravans bring things like goblin meat with them.

However, I have yet to find a way to actually do this in my own fort.

Do I need to add the [pet] tag to all the other races so that they can be freely butchered?

You changed the ETHICS EAT_SAPIENT_OTHER:UNTHINKABLE to something, like I guess, ACCEPTABLE right?
Far as I can tell, that SHOULD be the only thing you need to butcher sentient creatures.

Amostubal

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.43.x QUESTIONS THREAD
« Reply #1793 on: May 25, 2017, 07:56:14 pm »

Shouldn't work... butchering sentients is broken as far as I know, and adding pet tags wont let you eat or use the meat, they will still act as if its junk...


What I would suggest is creating a fake creature.... call it CREATURE:SENTIENT make it not spawn naturally.  add in each caste of every race you are going to want to kill (basically CASTE:DWARF_MALE and CASTE:DWARF_FEMALE, etc etc etc), select all the castes for each race individually, add all the creature information for the entire race then, except tags that involve learning and can speak, basically they will be normal creatures that look like dwarfs or elfs or whatever.  after that add in caste information for each caste individually. repeat for each race.

now comes the fun part.  DFHack a script that identifies "unit targets" in range of the butcher shop, verifies they are NOT your civ/group, verifies their race and caste, then uses create-unit to create -race sentient -caste {prev_race}_{prev_caste}, and use create-unit's domesticate function on the new unit. same script should teleport the old units to 0,0,0 and set flag scuttle on them.

After that create a reaction at the butcher shop (something like "prepare captives for butchering") and make a reaction trigger in onLoad.init to target this reaction.  the reaction should have 0 reagents and products, just give it a skill if you want it. 

after all of that, if you did it all right and didn't mess up on creating the script and the sentient unit... you should be able to build cages around the butcher shop, hit the reaction and fake sentients will appear with the right race and caste names... then you simply tag them for butchering and you got elf hippie skulls!

the only reason i went this deep into the discussion... I've already done a similar thing before, and I know scripts that do each step already that would be able to perform this.... but otherwise your not going to be able to do it... if you want to really have a blast with it... you could have the created unit be set to scuttle also so they just appear as dead bodies around the butcher shop ready to be butchered.  Otherwise... without DFHack you wont be able to butcher "sentient" creatures and even with DFHack... I doubt you would be able to transform a dead unit body into another creature...

the game is just broken on sentient butchering.
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

armads

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.43.x QUESTIONS THREAD
« Reply #1794 on: May 25, 2017, 08:12:27 pm »

So I've been trying to mod in butchering sentients.

I edited the ethics tokens for the dwarves to make eating them okay, and the caravans bring things like goblin meat with them.

However, I have yet to find a way to actually do this in my own fort.

Do I need to add the [pet] tag to all the other races so that they can be freely butchered?

You changed the ETHICS EAT_SAPIENT_OTHER:UNTHINKABLE to something, like I guess, ACCEPTABLE right?
Far as I can tell, that SHOULD be the only thing you need to butcher sentient creatures.

Already did that. What that does is allow your dwarves to eat those things, or allow them to want to. It does not, however, allow them to butcher things. The reason is, of course, that if you have a caged goblin, there is no interaction to butcher it. You also cannot butcher a corpse that has been killed in combat, it just sits rotting outside.

They will however, eat the goblin meat that the caravans bring seasonally.

But butchering is quite different.

I did put the pet tags on the elves, and assuming they had no civid when spawned, they did show up in my animals list, which means in theory if I edited the tags more I could potentially have them adopt dwarves I suppose.

Though it does make me wonder what half of the ethics tags are for if they do nothing. Example, there's the slavery and make ornaments out of sentients tags, neither of which seem to do anything or be useful for anything other than creating conflicts between species.

The way I'm trying to go about it is to figure out how the game determines what is and is not butcherable in the first place, and then modify those things.
Logged

Demonic Gophers

  • Bay Watcher
    • View Profile
    • The Tunnels
Re: [MODDING] 0.43.x QUESTIONS THREAD
« Reply #1795 on: May 25, 2017, 09:15:52 pm »

Changing the ethics used to be enough to enable butchering of slain sentient enemies.  You could set up a stockpile, or build a butcher shop near the battlefield, and your cannibal dwarves would cheerfully turn the slain elf invasion force into dinner for the rest of the year and a nice pile of leather.  I think it was the tavern update that broke it - enemy corpses are now treated the same as ally corpses, or something.

You might be able to make it work by giving dwarves an attack interaction that removes the CAN_SPEAK tag, or something.
Logged
*Digs tunnel under thread.*
I also answer to Gophers and DG.
Quote from: Shades of Gray
*Says something inspiring and quote worthy.*
Opinions are great, they're like onions with pi.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [MODDING] 0.43.x QUESTIONS THREAD
« Reply #1796 on: May 26, 2017, 05:45:45 am »

It's broken. You cannot butcher corpses with the dead_dwarf (probably more properly dead_sentient) flag, regardless of ethics atm.

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: [MODDING] 0.43.x QUESTIONS THREAD
« Reply #1797 on: May 26, 2017, 06:04:34 am »

Yar, I use an interaction in adventurer mode which removes [CAN_LEARN] before killing something I'm gonna want to eat or make stuff out of, that apparently untoggles the sapient check. Prior to 42.01 it was broken the other way, you could just straight up kill your friends and eat them regardless of any ethics check, now you can't even if you took control of a wild animal and tried to eat a corpse you butchered beforehand (or added grasp to their small teeth so you could use a knife/pick up meat) it just results in "You lick the dwarf meat" awkwardness.
Logged

Rubik

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.43.x QUESTIONS THREAD
« Reply #1798 on: May 27, 2017, 04:05:57 pm »

Hi guys
Im making an herbs and plants mod, but I find the plant modding abilities quite limited. Can I make a shrub that takes a lot of time to mature (various seasons) and when it is fully grown, can be harvested once every two months?
For what I saw, you seem to only be able to grow things for each season alone

Is it the same for trees?
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: [MODDING] 0.43.x QUESTIONS THREAD
« Reply #1799 on: May 27, 2017, 04:45:30 pm »

Hi guys
Im making an herbs and plants mod, but I find the plant modding abilities quite limited. Can I make a shrub that takes a lot of time to mature (various seasons) and when it is fully grown, can be harvested once every two months?
For what I saw, you seem to only be able to grow things for each season alone

Is it the same for trees?

If you're talking about "farming" if you need something that spans several seasons (more than 3 months) you need to make sure it is plant-able in all seasons or if a 2 season it's planted in the earliest season. Because plants "die" if they are planted but not harvested/ready and they go out of their "season" scope.

so if you wanted something that takes about 2 years to grow and mature, it will need to be an all season plant.
Logged
Pages: 1 ... 118 119 [120] 121 122 ... 137