Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 249 250 [251] 252 253 ... 365

Author Topic: [MODDING] CREATURE & ENTITY QUESTIONS THREAD  (Read 646152 times)

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #3750 on: June 20, 2019, 04:19:08 pm »

Depends, so first. Yeah as soon as the interaction is ready the AI will use it whenever they can (currently with latest it's mostly in Combat for Fortress mode, most Hints are not working or work very very rarely now, Adv.Mode doesn't seem to have this issue?)

Anyways, Your best bet would probably be a "give me my skills" interaction that would stagger out when the other interactions would be ready
Code: [Select]
[CE_CAN_DO_INTERACTION:START:500:END:1000] Now if the creature is constantly using this "give me skills" interaction that END value would only mean how much longer after it's done casting that main interaction (so after combat) that it'd wear off. At the same time you can have the WAIT_PERIODs for the interactions be something else like 100, 120 So it appears that it only uses a set amount of skills until the battle ramps up, then it can use more. Or you can create more than one copy with long WAIT_PERIODs so that it looks like it's able to cast maybe 3 spells in a row, then after that casting them become random-ish if you give them odd and far between values

Thanks. So if I understand correctly, there is no way to have a global cooldown for CDI. If a creature knows 10 attack spells, they will always immediately cast them all at the start of combat and then stagger them dependent on the wait period?

What is a "give me my skills" interaction? Is that a usage hint?

digging up an old example from one of my discontinued mods
Code: [Select]
[INTERACTION:TEMP_HIDE]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_MANUAL_INPUT:creature]
[I_EFFECT:HIDE]
[IE_TARGET:A]
[IE_IMMEDIATE]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[IE_ARENA_NAME:Unhide - Part 1]
[SYNDROME]
[SYN_CLASS:UNHIDE]
[CE_CAN_DO_INTERACTION:START:5000:END:6000]
[CDI:INTERACTION:MATERIAL_EMISSION]
[CDI:ADV_NAME:Unhide - Part 2]
[CDI:TARGET:A:SELF_ONLY]
[CDI:MATERIAL:INORGANIC:SMOKE:TRAILING_VAPOR_FLOW]
[CDI:VERB:end your hiding:stops being hidden:NA]
[CDI:WAIT_PERIOD:1300]
[CDI:FREE_ACTION]

Basically an interaction that the creature can use, that gives it interactions to use. What this interaction did back in 34.xx was the creature would hide, and then use a ranged projectile at itself (basically shoots the ground) forcing it to leave ambush state. As the only way to leave that is to be discovered, or be the hunting job (this is regarding AI in fortress mode)
« Last Edit: June 20, 2019, 04:20:44 pm by Hugo_The_Dwarf »
Logged

brolol.404

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #3751 on: June 20, 2019, 07:04:03 pm »

Interesting. So the parent interaction has a cooldown and only one of the child interactions will be chosen at random on each reset of the parent cooldown? Or will all of the child interactions be instantly cast (like normal) once the parent interaction goes off? ie:

Code: [Select]
[INTERACTION:CAN_CAST_SPELLS]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_MANUAL_INPUT:creature]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[IE_ARENA_NAME:Cast Spells]
[SYNDROME]
[SYN_CLASS:SPELL_LIST]
[CE_CAN_DO_INTERACTION:START:5000:END:6000]
[CDI:ADV_NAME:Spell 1]
[CE_CAN_DO_INTERACTION:START:5000:END:6000]
[CDI:ADV_NAME:Spell 2]
[CE_CAN_DO_INTERACTION:START:5000:END:6000]
[CDI:ADV_NAME:Spell 3]
[CE_CAN_DO_INTERACTION:START:5000:END:6000]
[CDI:ADV_NAME:Spell 4]

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #3752 on: June 20, 2019, 07:45:50 pm »

Yeah, but if you have them all START:5000 then you've defeated your purpose of trying to make offset CDs
Logged

brolol.404

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #3753 on: June 20, 2019, 07:52:36 pm »

Ah ok. So the child interactions will be used in order of their start times (same order everytime the parent interaction resets)?

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #3754 on: June 20, 2019, 09:07:50 pm »

Yeah, basically. However if the parent interaction can recast before the END times it basically extends the END time. So if it was recast 5500 ticks in (6000 is the end) the new END time is now 11500 ticks so that means any child interactions that have started will still be available until the parent interaction stops being recast and the time finally runs out.

but having them all on the same START would defeat the purpose of trying to stagger the spells in the  first place. So you could have one start at 131, another at 267, etc etc. And each one having random wait times as well, like 402, 514. So that even when they are ready they are weirdly timed when they can be used again after.
Logged

brolol.404

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #3755 on: June 21, 2019, 05:24:29 am »

Yeah, basically. However if the parent interaction can recast before the END times it basically extends the END time. So if it was recast 5500 ticks in (6000 is the end) the new END time is now 11500 ticks so that means any child interactions that have started will still be available until the parent interaction stops being recast and the time finally runs out.

but having them all on the same START would defeat the purpose of trying to stagger the spells in the  first place. So you could have one start at 131, another at 267, etc etc. And each one having random wait times as well, like 402, 514. So that even when they are ready they are weirdly timed when they can be used again after.

Awesome thanks

brolol.404

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #3756 on: June 21, 2019, 05:50:34 am »

Actually, thinking about this more, what usage hint would I use for the parent interaction? If it is self only, an attack usage hint wont work

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #3757 on: June 21, 2019, 08:50:34 am »

Hmm if you don't include one, they use it as soon as they could, however for Fortress Mode since 42.xx Usage Hint's have been janky, and very very rarely get used outside of aggressive AI behavior (GREET, CLEAN_SELF, CLEAN_FRIEND, FLEEING,etc) hardly ever get used when they should but ATTACK and "no hint" are used consistently in combat.

However if you want to use ATTACK as the hint, you have to make a bounce back interaction but that's one more step and also has it's own downsides

Creature has "Start the BounceBack Interaction"
uses interaction on Target
Target gets "Give Spells Interaction" from the "Start the BounceBack Interaction"
Starting Creature now is affected and will slowly gain the other effects/interactions defined to be used

CONs:
You can't set it to only be used on the original assaulter so in the example "Creature" lets say is a DWARF, well if there are 5 dwarves vs 1 elf. Those 5 are going to hit them with "Give Spells Interaction" but who is the correct one for the elf to use it on? all 5? is it based on only a CASTE/CREATURE_CLASS well how generic do you want that to be? Because if DWARF and GOBLIN are targets, then if the elf was hit by a dwarf, the elf could then just pass the spells to a closer goblin that may be knocked out next to it.

Basically it's a lot of extra work as you have to custom tailor a lot of these, and the more "spell casters" and "types of spell casters" it just piles up.
Logged

brolol.404

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #3758 on: June 21, 2019, 09:35:42 am »

Oh ok. So usage hint is optional? A creature should continuously use interactions without usage hints (even out of combat)?

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #3759 on: June 21, 2019, 10:01:29 am »

Since you're using interactions you should be able to use syndrome classes to sort out targeting of the bounce back interaction. Give the original interaction that gave the dwarf the bounceback interaction a syndrome class, and target that syndrome class. The elf should then know who to target.
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.

DerMeister

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #3760 on: June 22, 2019, 04:04:17 am »

I need interaction code for harpy hero of transform female with spouse_conversion_target into another harpy.
Logged

Fallingfeather

  • Escaped Lunatic
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #3761 on: June 22, 2019, 01:53:06 pm »

Sooo, I'd really like to learn how to mod in Dwarf Fortress, and I decided to try and make a warrior cats (the book series by Erin Hunter) mod. The series has a lot of worldbuilding stuff in similar niches to DF, so I think it would be an interesting project to slowly mod the aspects of the warrior cats canon into DF, learning about modding as I go. I've already read the 'modding' article on the wiki, and I'm slowly chewing through other modding guides. I still have some questions though, starting with making the playable race of tribal cats.

1. The names. For those who haven't read the books- warrior cat names change over time. When they're born, they have the suffix -kit (ex. Snowkit, Toadkit, Flowerkit). As they get older, they become an apprentice and their suffix changes to -paw (Snowpaw, Toadpaw, Flowerpaw). Finally, upon reaching adulthood/full warrior status, they get one of a huge variety of suffixes. (So Snowpaw could end up being named Snowfur, Snowfoot, Snowheart, Snowflight, etc.). Finally, if they become leader of their clan, they get the suffix -star. The first 3 seem like they could easily be connected to natural aging mechanics in DF (Infant-->Child-->Adult), and the last to a change in rank (being elected to a position of power like mayor or expedition leader). However, I'm stuck on how to implement these changes, as dwarves are given a name at birth and that doesn't usually change. Any suggestions?

2. I was also wondering about generated appearances. I know most dwarves upon embarkment have the same skin and hair color. Is there any way to make my citizens more diverse upon embarkment? For example, I don't want to start out with 7 brown cats with yellow eyes.

Any assistance is appreciated! :3 Modding DF seems fun, and I hope I can learn to enjoy making mods.
Logged

TomiTapio

  • Bay Watcher
  • OldGenesis since 2012
    • View Profile
    • My Flickr animal photos
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #3762 on: June 22, 2019, 03:04:58 pm »

However, I'm stuck on how to implement these changes, as dwarves are given a name at birth and that doesn't usually change. Any suggestions?

2. I was also wondering about generated appearances. I know most dwarves upon embarkment have the same skin and hair color. Is there any way to make my citizens more diverse upon embarkment?
Maybe some workshop reaction that makes a transformation gas that changes the caste of the catperson. First and last name probably stay the same, but new caste can have different default skills and attributes.

This part of dwarf apperances many give hints:
Spoiler (click to show/hide)

TLCM_TIMING tag for fur going gray/othercolor over age:
http://dwarffortresswiki.org/index.php/DF2014:Creature_token#TLCM_TIMING
also TL_COLOR_MODIFIER for the frequencies of tissue-layer-colors.
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

Strik3r

  • Bay Watcher
  • Persistently work-in-progress.
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #3763 on: June 22, 2019, 03:11:26 pm »

Sooo, I'd really like to learn how to mod in Dwarf Fortress, and I decided to try and make a warrior cats (the book series by Erin Hunter) mod. The series has a lot of worldbuilding stuff in similar niches to DF, so I think it would be an interesting project to slowly mod the aspects of the warrior cats canon into DF, learning about modding as I go. I've already read the 'modding' article on the wiki, and I'm slowly chewing through other modding guides. I still have some questions though, starting with making the playable race of tribal cats.

1. The names. For those who haven't read the books- warrior cat names change over time. When they're born, they have the suffix -kit (ex. Snowkit, Toadkit, Flowerkit). As they get older, they become an apprentice and their suffix changes to -paw (Snowpaw, Toadpaw, Flowerpaw). Finally, upon reaching adulthood/full warrior status, they get one of a huge variety of suffixes. (So Snowpaw could end up being named Snowfur, Snowfoot, Snowheart, Snowflight, etc.). Finally, if they become leader of their clan, they get the suffix -star. The first 3 seem like they could easily be connected to natural aging mechanics in DF (Infant-->Child-->Adult), and the last to a change in rank (being elected to a position of power like mayor or expedition leader). However, I'm stuck on how to implement these changes, as dwarves are given a name at birth and that doesn't usually change. Any suggestions?

2. I was also wondering about generated appearances. I know most dwarves upon embarkment have the same skin and hair color. Is there any way to make my citizens more diverse upon embarkment? For example, I don't want to start out with 7 brown cats with yellow eyes.

Any assistance is appreciated! :3 Modding DF seems fun, and I hope I can learn to enjoy making mods.

Welcome to the forums!
To answer your questions:

1. Is not possible right now.

2. The appearance of creatures within a civ is usually pretty similar as a result of (simulated) genetics. There is the TLCM_GENETIC_MODEL creature tag. According to the wiki, this might affect how and whether color is passed down. However, it seens like nobody has any idea whether it works, how it works or what parameters it takes. If anyone has any experience with TLCM_GENETIC_MODEL, please fill in the info for this tag on the wiki.
Logged
NOTICE: If you can't update your profile/signature, stop using a Imgur URL for your profile picture.
Upload it to somewhere else.

scourge728

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #3764 on: June 23, 2019, 09:06:50 pm »

Sooo, I'd really like to learn how to mod in Dwarf Fortress, and I decided to try and make a warrior cats (the book series by Erin Hunter) mod. The series has a lot of worldbuilding stuff in similar niches to DF, so I think it would be an interesting project to slowly mod the aspects of the warrior cats canon into DF, learning about modding as I go. I've already read the 'modding' article on the wiki, and I'm slowly chewing through other modding guides. I still have some questions though, starting with making the playable race of tribal cats.

1. The names. For those who haven't read the books- warrior cat names change over time. When they're born, they have the suffix -kit (ex. Snowkit, Toadkit, Flowerkit). As they get older, they become an apprentice and their suffix changes to -paw (Snowpaw, Toadpaw, Flowerpaw). Finally, upon reaching adulthood/full warrior status, they get one of a huge variety of suffixes. (So Snowpaw could end up being named Snowfur, Snowfoot, Snowheart, Snowflight, etc.). Finally, if they become leader of their clan, they get the suffix -star. The first 3 seem like they could easily be connected to natural aging mechanics in DF (Infant-->Child-->Adult), and the last to a change in rank (being elected to a position of power like mayor or expedition leader). However, I'm stuck on how to implement these changes, as dwarves are given a name at birth and that doesn't usually change. Any suggestions?

2. I was also wondering about generated appearances. I know most dwarves upon embarkment have the same skin and hair color. Is there any way to make my citizens more diverse upon embarkment? For example, I don't want to start out with 7 brown cats with yellow eyes.

Any assistance is appreciated! :3 Modding DF seems fun, and I hope I can learn to enjoy making mods.
Oh hello.... I had my own ideas for such a mod, but rather different in the specifics
Pages: 1 ... 249 250 [251] 252 253 ... 365