Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [MODDING] 50.x replace/delete specific tokens in existing creatures  (Read 1056 times)

KawaiiSelbst

  • Escaped Lunatic
    • View Profile

Hi guys 🖐️
Can you tell me, it is possible to replace/delete specific tokens from existing creature thats applying creature variation?
I need to change [POPULATION_NUMBER] token in all ANIMAL_PERSON's
 
Most likely, this can be done if you create another creature variation and apply with
Code: [Select]
[SELECT_CREATURE:CREATURE_NAME]
    [APPLY_CREATURE_VARIATION:VARIATION_NAME]
But then I want to understand how it will work if you apply several variations on one creature that change the same tokens.

In addition, I want to find out if there is an easier way to remove/change an existing tag from a creature?
Logged

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: [MODDING] 50.x replace/delete specific tokens in existing creatures
« Reply #1 on: January 25, 2023, 01:56:23 pm »

Creature variations are your best bet. You're going to want to use one to remove the population tags, exactly as you're doing in your example. Just add a new population number tag after that. As long as your changes are the last ones done to those tags, they should take effect and be used in world generation/gameplay.

For the moment, creature variations are the easiest way to accomplish this for creatures. Your other option would be to delete the old creature entry and write a new one.
« Last Edit: January 25, 2023, 01:57:55 pm by Eric Blank »
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.

KawaiiSelbst

  • Escaped Lunatic
    • View Profile
Re: [MODDING] 50.x replace/delete specific tokens in existing creatures
« Reply #2 on: January 26, 2023, 02:55:38 am »

Creature variations are your best bet. You're going to want to use one to remove the population tags, exactly as you're doing in your example. Just add a new population number tag after that. As long as your changes are the last ones done to those tags, they should take effect and be used in world generation/gameplay.

For the moment, creature variations are the easiest way to accomplish this for creatures. Your other option would be to delete the old creature entry and write a new one.

In the discord chat, I was told that exclusive tokens will be applied on the last occurrence, then the last one will be applied, and quite as the simplest solution, you can do this
Code: [Select]
[SELECT_CREATURE:ALBATROSS_MAN]
[PET_EXOTIC]
[POPULATION_NUMBER:200:400]
It also turned out that tokens CV_REMOVE_TAG, CV_ADD_TAG they work normally inside the creature, and you can make the final raw cleaner by removing the old POPULATION_NUMBER altogether
Code: [Select]
[SELECT_CREATURE:AARDVARK_MAN]
[CV_REMOVE_TAG:POPULATION_NUMBER]
[PET_EXOTIC]
[APPLY_CURRENT_CREATURE_VARIATION]
[POPULATION_NUMBER:200:400]

Logged

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: [MODDING] 50.x replace/delete specific tokens in existing creatures
« Reply #3 on: January 26, 2023, 03:07:52 pm »

Well that's good, I do like to make sure I get rid of the old tags... are you making them all pets?
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.

KawaiiSelbst

  • Escaped Lunatic
    • View Profile
Re: [MODDING] 50.x replace/delete specific tokens in existing creatures
« Reply #4 on: January 30, 2023, 02:50:21 am »

Well that's good, I do like to make sure I get rid of the old tags... are you making them all pets?
Yes. By analogy with gremlins, but now I'm not sure it makes sense anymore, so I divided it into 2 different mods.
Logged