Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 23 24 [25] 26 27 ... 62

Author Topic: [MODDING] General modding questions thread  (Read 153942 times)

faloxx

  • Bay Watcher
  • Petting a dragon is not a good idea, trust me.
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #360 on: March 03, 2020, 10:59:51 am »

This isn't relevant to the newest version, but I've scoured this forum, the wiki and the Reddit but I couldn't find the answer anywhere.

What are the specific material tokens for dyes? I want to have a reagent that only allows red (hide root) dye, but nothing I try seems to work.
My last attempt was this:
Spoiler (click to show/hide)
When I attempted it with a regular hide root it recognised the hide root but not the barrel somehow.

Any help is appreciated.
Logged

TomiTapio

  • Bay Watcher
  • OldGenesis since 2012
    • View Profile
    • My Flickr animal photos
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #361 on: March 03, 2020, 01:29:27 pm »

What are the specific material tokens for dyes? I want to have a reagent that only allows red (hide root) dye, but nothing I try seems to work.
[REAGENT:DYE:150:POWDER_MISC:NONE:PLANT_MAT:ROOT_HIDE:STRUCTURAL]
It's not that plant's structural, it's probably the MILL material:
Plant has:
   [USE_MATERIAL_TEMPLATE:MILL:PLANT_POWDER_TEMPLATE]
      ........ [POWDER_DYE:RED] ....
   [MILL:LOCAL_PLANT_MAT:MILL]

Try [REAGENT:dye1:150:POWDER_MISC:NONE:PLANT_MAT:ROOT_HIDE:MILL]
« Last Edit: March 03, 2020, 01:33:37 pm by TomiTapio »
Logged
==OldGenesis mod== by Deon & TomiTapio. Five wood classes, four leather classes. Nine enemy civs. So much fine-tuning.
47.05e release: http://dffd.bay12games.com/who.php?id=1538
OldGenesis screenshots: https://twitter.com/hashtag/OldGenesis?src=hashtag_click&f=image
My Finnish language file: http://dffd.bay12games.com/file.php?id=14884

Thuellai

  • Bay Watcher
  • Nobody's business but the Turks
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #362 on: March 03, 2020, 02:51:56 pm »

Have a list of stuff where I'm wondering if it's possible and what consequences might happen if I put it into the raws for an upcoming mod I'm thinking of doing.

1. Multi-creature civs - I know civs will swap members around a bit now, but can you actually have a civ that spawns multiple creature types or does all mingling have to happen in world-gen?

2.  Megabeasts that brainwash enemies sent to fight them - can this be done with an interaction?  Can that interaction then be resisted by specific creatures, to create a rare caste immune to their power?  Will it cause horrible loyalty cascades if one invades the fort, corrupts a dorf or dorf equivalent, and then other dorfs end up killing that one?

3.  Objects that provide or enhance skill experience in some way?  The obvious answer is 'used as a non-consumed reagent in a reaction that produces instantly evaporating harmless dust', right?  The setting has gems that can be inscribed with someone's memories, allowing them to pass their skills on to another holder - letting the player get access to these once they have a legendary hero with the skill, then use them to train other members of the fort, would be a cool touch.
Logged
When you're following an angel, does it mean you have to throw your body off a building?

"So kids, what story do you want me to read to you tonight?"
"Oooh!  Oooh!  Goldibeard and the The Rotting Corpses!"
~LegacyCWAL

faloxx

  • Bay Watcher
  • Petting a dragon is not a good idea, trust me.
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #363 on: March 03, 2020, 03:41:50 pm »

Try [REAGENT:dye1:150:POWDER_MISC:NONE:PLANT_MAT:ROOT_HIDE:MILL]

Ha, that did the trick. Thanks a lot! Plants are still kind of confusing.

2.  Megabeasts that brainwash enemies sent to fight them - can this be done with an interaction?  Can that interaction then be resisted by specific creatures, to create a rare caste immune to their power?  Will it cause horrible loyalty cascades if one invades the fort, corrupts a dorf or dorf equivalent, and then other dorfs end up killing that one?

I can't answer the others, but I have a feeling this one might be possible. You could maybe do something that's similar to the night creatures that capture and convert creatures with the [SPOUSE_CONVERSION_TARGET] token. I'm not too familiar with the night creature raws, but if you dig them up you could probably see how their interactions work. Beside that you could also try looking at the new necromancers and their intelligent undead. They "transform" creatures into their luitenants too.
Logged

pikachu17

  • Bay Watcher
  • PADORU PADORU
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #364 on: March 03, 2020, 04:05:53 pm »

Have a list of stuff where I'm wondering if it's possible and what consequences might happen if I put it into the raws for an upcoming mod I'm thinking of doing.

1. Multi-creature civs - I know civs will swap members around a bit now, but can you actually have a civ that spawns multiple creature types or does all mingling have to happen in world-gen?

2.  Megabeasts that brainwash enemies sent to fight them - can this be done with an interaction?  Can that interaction then be resisted by specific creatures, to create a rare caste immune to their power?  Will it cause horrible loyalty cascades if one invades the fort, corrupts a dorf or dorf equivalent, and then other dorfs end up killing that one?

3.  Objects that provide or enhance skill experience in some way?  The obvious answer is 'used as a non-consumed reagent in a reaction that produces instantly evaporating harmless dust', right?  The setting has gems that can be inscribed with someone's memories, allowing them to pass their skills on to another holder - letting the player get access to these once they have a legendary hero with the skill, then use them to train other members of the fort, would be a cool touch.
1. You cannot. If you try to give a civ multiple creatures, at civ-creation a random creature of that list will have that civ.

2.I believe you can make an interaction that gives creatures OPPOSED_TO_LIFE(with the megabeast having NOT_LIVING)

I think it might create loyalty cascades, but I'm not sure. I'm not absolutely sure this method will keep the creatures from continuing to attack the megabeast.
3.There is no way to pass on limit a reaction to a Legendary creature, so that with the gems specifically wouldn't work. You can however make a reagent-less or not reaction that just creates something (traditionally a boulder) that'll instantly boil away, like you said.

I can't answer the others, but I have a feeling this one might be possible. You could maybe do something that's similar to the night creatures that capture and convert creatures with the [SPOUSE_CONVERSION_TARGET] token. I'm not too familiar with the night creature raws, but if you dig them up you could probably see how their interactions work. Beside that you could also try looking at the new necromancers and their intelligent undead. They "transform" creatures into their lieutenants too.
Spouse conversion is not done through interactions, that won't work. SPOUSER_CONVERTERs only convert in world-gen anyway.
Yeah, animation is probaby the best interaction type for things like this.
Resurrection appears to currently include the original loyalties, so if they raise a lieutenant of your dwarves, the dwarves will attack them.
Logged
Sigtext!
dwarf 4tress from scratch
The Pikachu revolution!
Thank you NatureGirl19999 for the avatar switcher at http://signavatar.com

A warforged bard named Gender appears and says"Hello. I am a social construct."

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #365 on: March 03, 2020, 04:40:26 pm »

So I am trying to use the new summoning interaction to force my dwarves summon automatons after interacting with an assembly line.
It produces a poofing stone which gives them a syndrome.

Code: [Select]
[INORGANIC:POOF_SUMMON_CENTURION_COPPER]
[USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]
[STATE_NAME_ADJ:ALL:summon copper centurion]
[BOILING_POINT:1000]
[SYNDROME]
[SYN_NAME:can summon copper centurion]
[SYN_INGESTED]
[SYN_CONTACT]
[SYN_INHALED]
[SYN_NO_HOSPITAL]
[SYN_CONCENTRATION_ADDED:1000:0]
[CE_DISPLAY_NAME:NAME:(assembly cooldown):(assembly cooldown):(assembly cooldown):START:0:END:3000:ABRUPT]
[CE_CAN_DO_INTERACTION:PROB:100:START:0:END:3000:ABRUPT]
[CDI:ADV_NAME:Summon copper centurion]
[CDI:INTERACTION:SUMMON_CENTURION_COPPER]
[CDI:TARGET:A:SELF_ONLY]
[CDI:MAX_TARGET_NUMBER:A:1]
[CDI:VERB:power up the copper centurion:powers up the copper centurion:NA]
[CDI:WAIT_PERIOD:3000]

Code: [Select]
[INTERACTION:SUMMON_CENTURION_COPPER]
[I_TARGET:A:LOCATION]
[IT_LOCATION:CONTEXT_LOCATION]
[I_TARGET:B:LOCATION]
[IT_LOCATION:RANDOM_NEARBY_LOCATION:A:1]
    [I_EFFECT:SUMMON_UNIT]
        [IE_TARGET:B]
        [IE_IMMEDIATE]
            [CREATURE:CENTURION_COPPER:ALL]
            [IE_MAKE_PET_IF_POSSIBLE]

They get the status correctly (assembly cooldown), but they don't want to summon.
According to the wiki, specifying no USAGE_HINT should make them use this as soon as a target is available. And a target IS available, it's them.
Has anyone had any luck to make dwarves use interaction without USAGE_HINT?

P.S. Just to confirm, if I spawn this rock in adventure mode via a cheat reaction, I immediately get the power and can use it without selecting a target, so there's no mistake there.
« Last Edit: March 03, 2020, 04:43:29 pm by Deon »
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Demonic Gophers

  • Bay Watcher
    • View Profile
    • The Tunnels
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #366 on: March 03, 2020, 06:20:06 pm »

As far as I know, the closest you can currently get to a multi-species civ is one main species and guaranteed access to others as intelligent pets, like with goblins and trolls in vanilla.  They won't act exactly like proper citizens, but it should at least be possible to get them to show up, and I think they can do labors in fort mode.


In my experience, people in fortress mode rarely or never use no-hint interactions away from combat.  They used to do so at every opportunity, but don't seem to any more.  A thought I just had: maybe you could use CLEAN_SELF to prompt them to use it immediately?  If the reaction or syndrome leaves them covered in a contaminant, they might be willing to use a cleaning interaction to get rid of it.  Haven't tested this, but it could be worth trying.
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.

Fatace

  • Bay Watcher
  • Cease hostilities? Never!
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #367 on: March 03, 2020, 08:45:22 pm »

EDIT: out of curiosity TomiTapio, do you have custom Positions that are in Forest/City Civs that have positions based off other civs? Such as a City having a Druid Position?

One could experiment with position/civ deletions until there's no worldgen crashes...



Yeah that's pretty much what Ill be doing all day or 2 for me till I fix any possible issues lol.

Okay I found the cause of the issue, thankfully it was nothing to do with entity positions... *whew*

BUT im now further confused... because my forest retreat civ can no longer have [NO_EAT] in their creature raw.... and im baffled to why this was causing the mid-world generation crashes..... has anyone found this issue yet?
« Last Edit: March 03, 2020, 09:02:34 pm by Fatace »
Logged
I once had a 30 dwarf glacier fortress once.. was going great till the dwarf merchants brought along a WereKoala and killed everyone...

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #368 on: March 03, 2020, 09:35:28 pm »

The display colour of dyed cloth carries over to the display colour of clothing crafted with it. I was wondering if there was a way to do this with custom reactions that produce tools? They are all coming out the colour of the undyed cloth.
« Last Edit: March 03, 2020, 09:55:34 pm by Vattic »
Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

Fatace

  • Bay Watcher
  • Cease hostilities? Never!
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #369 on: March 03, 2020, 11:30:44 pm »

Also, previously based off my other question from the last page... I checked a worlds raws and noticed that the world that I had, had over 1700 MEDIUM_BLESSINGS....       so im gunna assume, every time you use the dice, it takes a random choice out of all the blessings and curses.. which in my world, is currently...

Minor Blessings: 3391
Medium Blessings: 1736
Minor Curses: 6782
Medium Curses: 1736
Which is a total of 13645 blessings/curses total..

and even so, if you don't get one of those, you get messages like "You must reflect on your actions.","Make the sacrifice regardless of fear.","Consider the consequences carefully." Which seem like a Neutral response, if nothing happens... and if you kept going and tempting the fate of the gods, you will be cursed...

PLUS it seems the chances of getting 1 or the other or neither, depends on how many sides of the die there are... So if I were to assume the neutral message just as 1, then that means, getting the correct blessing you want is 1 out of 13646, (at least on this world) I assume the blessings/curses depends on the world generation, size, amount of gods, ect...

Which my true question is.. if I were to make a new interaction for the divine rolling to give me a specific type of metal weapon or artifact, ect, will that just add +1 to the list of world generated divine rolls? Hmm..


Logged
I once had a 30 dwarf glacier fortress once.. was going great till the dwarf merchants brought along a WereKoala and killed everyone...

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #370 on: March 04, 2020, 01:36:48 am »

According to the wiki, specifying no USAGE_HINT should make them use this as soon as a target is available. And a target IS available, it's them.
Has anyone had any luck to make dwarves use interaction without USAGE_HINT?

P.S. Just to confirm, if I spawn this rock in adventure mode via a cheat reaction, I immediately get the power and can use it without selecting a target, so there's no mistake there.

The wiki is outdated. There is currently no straightforward way of forcing an AI controlled unit to use an interaction, simce non-combat interactions are used randomly (and infrequently). Which is incredibly annoying, since properly linking reactions to interactions would open up a ton of fort mode possibilities.  DFHack has a plugin for that.

The best I've been able to do is to make the unit CRAZED for one tick, which will make them enter combat if there is a creature nearby, causing them to use the interaction and hopefully not actually attack anyone, but this is as unreliable as it sounds.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #371 on: March 04, 2020, 04:06:05 am »

That confirms my testing, thank you for your answer, IndigoFenix.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

MaxTheFox

  • Bay Watcher
  • Лишь одна дорожка да на всей земле
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #372 on: March 04, 2020, 08:08:15 am »

How to make an interaction that flings the user themselves at a creature or location? I can't get it to work.

Also, how to summon a single species of creature instead of only those with a specific token?
« Last Edit: March 04, 2020, 08:52:16 am by MaxTheFox »
Logged
Woe to those who make unjust laws, to those who issue oppressive decrees, to deprive the poor of their rights and withhold justice from the oppressed of my people, making widows their prey and robbing the fatherless. What will you do on the day of reckoning, when disaster comes from afar?

Flying Teasets

  • Bay Watcher
  • another nation, or a non-governmental entity
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #373 on: March 04, 2020, 03:44:05 pm »

How can I create an interaction that only targets undead?
Logged
Flying Teasets is stricken by melancholy!
The USA is a rogue state.

TomiTapio

  • Bay Watcher
  • OldGenesis since 2012
    • View Profile
    • My Flickr animal photos
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #374 on: March 04, 2020, 04:36:02 pm »

How can I create an interaction that only targets undead?
Something with IT_AFFECTED_CLASS,
or IT_IMMUNE_CLASS : general poison, which covers most animals.
Anyone got a list of hardcoded classes? Like FILTH_B is hardcoded material?

Hmm.. IT_REQUIRES offers choice of  NO_DRINK, NO_EAT, NO_FEVERS, NO_SLEEP, NOBREATHE, etc.
NOT_LIVING, NOTHOUGHT, OPPOSED_TO_LIFE... one of those should do the trick. I guess all undead are OPPOSED_TO_LIFE.
https://dwarffortresswiki.org/index.php/DF2014:Interaction_token#IT_REQUIRES
Logged
==OldGenesis mod== by Deon & TomiTapio. Five wood classes, four leather classes. Nine enemy civs. So much fine-tuning.
47.05e release: http://dffd.bay12games.com/who.php?id=1538
OldGenesis screenshots: https://twitter.com/hashtag/OldGenesis?src=hashtag_click&f=image
My Finnish language file: http://dffd.bay12games.com/file.php?id=14884
Pages: 1 ... 23 24 [25] 26 27 ... 62