Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Can we set multiple OBJECT:TEXT_SET's in the same file?  (Read 920 times)

Fatace

  • Bay Watcher
  • Cease hostilities? Never!
    • View Profile
Can we set multiple OBJECT:TEXT_SET's in the same file?
« on: January 01, 2023, 11:54:20 am »

Are we able to set multiple text set's in 1 file, or do they need to be seperate files? Theres nothing on DFWiki about this or anywhere.

Example:

text_secret_example1

[OBJECT:TEXT_SET]

[TEXT_SET:SECRET_EXAMPLE1]

the Pyromancy
Scorcher
the Firestarter
Ruination
Volcanic
the Heat
the Burn
Meltdown
the Lash

[TEXT_SET:SECRET_EXAMPLE2]

the Frost
Frozen
Icy Wind
the Chilling
Frosty Ruin
the Hailing
the Freezing
Ice
the Cryomancy




EDIT: I did test this to see if it would work, no errorlogs, but theres no good way to check to see if it actually worked since codex/scrolls contianing secrets rarely show up, let along use these.
« Last Edit: January 01, 2023, 12:00:15 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...

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Re: Can we set multiple OBJECT:TEXT_SET's in the same file?
« Reply #1 on: March 22, 2023, 02:51:40 pm »

I am also interested in the answer to this. Has anyone figured this out?

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Can we set multiple OBJECT:TEXT_SET's in the same file?
« Reply #2 on: March 22, 2023, 08:07:25 pm »

It doesn't matter, because...

...you can't define your own arbitrary TEXT_SETs.  [TEXT_SET:SECRET_EXAMPLE1] is just ignored.

These are the only TEXT_SET definitions that will do anything, straight from the executable:


Code: [Select]
.rdata:00007FF6870397F0 aSpeechGreet db 'SPEECH_GREET',0
.rdata:00007FF687039800 aSpeechGreetRep db 'SPEECH_GREET_REPLY',0
.rdata:00007FF687039818 aSpeechSlayer db 'SPEECH_SLAYER',0
.rdata:00007FF687039828 aSpeechThreat db 'SPEECH_THREAT',0
.rdata:00007FF687039838 aSecretDeath db 'SECRET_DEATH',0
.rdata:00007FF687039848 aSpeechGeneral db 'SPEECH_GENERAL',0
.rdata:00007FF687039858 aBookInstructio db 'BOOK_INSTRUCTION',0
.rdata:00007FF687039870 aBookArt db 'BOOK_ART',0
.rdata:00007FF687039880 aSpeechGoodbyeW_1 db 'SPEECH_GOODBYE_WORSHIP_3',0
.rdata:00007FF6870398A0 aSpeechTempleAl db 'SPEECH_TEMPLE_ALREADY_MEMBER',0
.rdata:00007FF6870398C0 aSpeechGoodbyeW db 'SPEECH_GOODBYE_WORSHIP_1',0
.rdata:00007FF6870398E0 aSpeechGoodbyeW_0 db 'SPEECH_GOODBYE_WORSHIP_2',0
.rdata:00007FF687039900 aSpeechGreetWor db 'SPEECH_GREET_WORSHIP',0
.rdata:00007FF687039918 aSpeechGreetBab db 'SPEECH_GREET_BABY',0
.rdata:00007FF687039930 aSpeechGreetRep_0 db 'SPEECH_GREET_REPLY_DIFF_LANGUAGE',0
.rdata:00007FF687039958 aSpeechGreetRep_1 db 'SPEECH_GREET_REPLY_UNUSUAL_FIRST',0
.rdata:00007FF687039980 aSpeechThiefPro_0 db 'SPEECH_THIEF_PROFESSION_YEAR',0
.rdata:00007FF6870399A0 aSpeechPastWand db 'SPEECH_PAST_WANDERING_PROFESSION',0
.rdata:00007FF6870399C8 aSpeechHuntingP_0 db 'SPEECH_HUNTING_PROFESSION_YEAR',0
.rdata:00007FF6870399E8 aSpeechSnatcher_0 db 'SPEECH_SNATCHER_PROFESSION_YEAR',0
.rdata:00007FF687039A08 aSpeechAnimalSl db 'SPEECH_ANIMAL_SLAYER',0
.rdata:00007FF687039A20 aSpeechWanderin_0 db 'SPEECH_WANDERING_PROFESSION_YEAR',0
.rdata:00007FF687039A48 aSpeechCurrentP_0 db 'SPEECH_CURRENT_PROFESSION_YEAR',0
.rdata:00007FF687039A68 aSpeechHistFigS db 'SPEECH_HIST_FIG_SLAYER',0
.rdata:00007FF687039A80 aSpeechPastMerc db 'SPEECH_PAST_MERCENARY_PROFESSION',0
.rdata:00007FF687039AA8 aSpeechMercenar db 'SPEECH_MERCENARY_PROFESSION',0
.rdata:00007FF687039AC8 aSpeechMercenar_0 db 'SPEECH_MERCENARY_PROFESSION_YEAR',0
.rdata:00007FF687039AF0 aSpeechPastThie db 'SPEECH_PAST_THIEF_PROFESSION',0
.rdata:00007FF687039B10 aSpeechGreetRep_2 db 'SPEECH_GREET_REPLY_AFTER_HERO',0
.rdata:00007FF687039B30 aSpeechPastHunt db 'SPEECH_PAST_HUNTING_PROFESSION',0
.rdata:00007FF687039B50 aSpeechPastSnat db 'SPEECH_PAST_SNATCHER_PROFESSION',0
.rdata:00007FF687039B70 aSpeechWanderin db 'SPEECH_WANDERING_PROFESSION',0
.rdata:00007FF687039B90 aSpeechHuntingP db 'SPEECH_HUNTING_PROFESSION',0
.rdata:00007FF687039BB0 aSpeechFamilyRe_4 db 'SPEECH_FAMILY_RELATIONSHIP_ADDITIONAL_DEAD',0
.rdata:00007FF687039BE0 aSpeechChildAge db 'SPEECH_CHILD_AGE_PROCLAMATION',0
.rdata:00007FF687039C00 aSpeechFamilyRe_2 db 'SPEECH_FAMILY_RELATIONSHIP_SPEC_DEAD',0
.rdata:00007FF687039C28 aSpeechFamilyRe_3 db 'SPEECH_FAMILY_RELATIONSHIP_NO_SPEC_DEAD',0
.rdata:00007FF687039C50 aSpeechFamilyRe_0 db 'SPEECH_FAMILY_RELATIONSHIP_NO_SPEC',0
.rdata:00007FF687039C78 aSpeechFamilyRe_1 db 'SPEECH_FAMILY_RELATIONSHIP_ADDITIONAL',0
.rdata:00007FF687039CA0 aSpeechPastProf_0 db 'SPEECH_PAST_PROFESSION_YEAR',0
.rdata:00007FF687039CC0 aSpeechCurrentP db 'SPEECH_CURRENT_PROFESSION_NO_YEAR',0
.rdata:00007FF687039CE8 aSpeechSoldierP db 'SPEECH_SOLDIER_PROFESSION',0
.rdata:00007FF687039D08 aSpeechPastProf db 'SPEECH_PAST_PROFESSION_NO_YEAR',0
.rdata:00007FF687039D28 aSpeechGuardPro db 'SPEECH_GUARD_PROFESSION',0
.rdata:00007FF687039D40 aSpeechGuardWar db 'SPEECH_GUARD_WARNING',0
.rdata:00007FF687039D58 aSpeechThiefPro db 'SPEECH_THIEF_PROFESSION',0
.rdata:00007FF687039D70 aSpeechSnatcher db 'SPEECH_SNATCHER_PROFESSION',0
.rdata:00007FF687039D90 aSpeechSameSite db 'SPEECH_SAME_SITE_AB_SPECIFIC_HF_SEEKER',0
.rdata:00007FF687039DB8 aSpeechSameSite_0 db 'SPEECH_SAME_SITE_SPECIFIC_HF_SEEKER',0
.rdata:00007FF687039DE0 aSpeechAbSpecif db 'SPEECH_AB_SPECIFIC_HF_SEEKER',0
.rdata:00007FF687039E00 aSpeechSiteSpec db 'SPEECH_SITE_SPECIFIC_HF_SEEKER',0
.rdata:00007FF687039E20 aSpeechTaskReco db 'SPEECH_TASK_RECOMMENDATION',0
.rdata:00007FF687039E40 aSpeechUnknownH db 'SPEECH_UNKNOWN_HF_SEEKER',0
.rdata:00007FF687039E60 aSpeechTempleBe db 'SPEECH_TEMPLE_BECOME_MEMBER',0
.rdata:00007FF687039E80 aSpeechPositive db 'SPEECH_POSITIVE',0
.rdata:00007FF687039E90 aSpeechNoFamily db 'SPEECH_NO_FAMILY',0
.rdata:00007FF687039EA8 aSpeechFamilyRe db 'SPEECH_FAMILY_RELATIONSHIP_SPEC',0
.rdata:00007FF687039EC8 aSpeechJustific_2 db 'SPEECH_JUSTIFICATION_REMINDER',0
.rdata:00007FF687039EE8 aSpeechJustific_3 db 'SPEECH_JUSTIFICATION_ANTITHETICAL',0
.rdata:00007FF687039F10 aSpeechJustific_0 db 'SPEECH_JUSTIFICATION_PROXIMITY',0
.rdata:00007FF687039F30 aSpeechJustific_1 db 'SPEECH_JUSTIFICATION_EXPERIENCE',0
.rdata:00007FF687039F50 aSpeechArchInfo db 'SPEECH_ARCH_INFO_JUSTIFICATION',0
.rdata:00007FF687039F70 aSpeechJustific db 'SPEECH_JUSTIFICATION_REPRESENTATION',0

Alright, Putnam, if you say so....
« Last Edit: March 25, 2023, 04:01:48 pm by 0x517A5D »
Logged

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Re: Can we set multiple OBJECT:TEXT_SET's in the same file?
« Reply #3 on: March 23, 2023, 04:59:41 am »

It doesn't matter, because...

...you can't define your own arbitrary TEXT_SETs.  [TEXT_SET:SECRET_EXAMPLE1] is just ignored.

These are the only TEXT_SET definitions that will do anything, straight from the executable:

Awesome, that's good to know. Though in my case, I was interested in how the parser behaves, not just the practicality of adding new TEXT_SETs.

So in light of all this, I tried modifying the vanilla TEXT_SETs to define two in the same file.

I got an error with Dwarf Fortress when trying to start a new game, saying the TEXT_SET I had pasted below another one couldn't be found.

So I think this confirms that TEXT_SETs are a special case in the parser, and everything following a [TEXT_SET:ID] token in a file is treated as newline-separated strings, not parsed as normal tokens. Meaning you can't put two different TEXT_SETs in the same file.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Can we set multiple OBJECT:TEXT_SET's in the same file?
« Reply #4 on: March 25, 2023, 03:43:01 am »

It doesn't matter, because...

...you can't define your own arbitrary TEXT_SETs.  [TEXT_SET:SECRET_EXAMPLE1] is just ignored.

These are the only TEXT_SET definitions that will do anything, straight from the executable:

Code: [Select]
.rdata:00007FF6870397F0 aSpeechGreet db 'SPEECH_GREET',0
.rdata:00007FF687039800 aSpeechGreetRep db 'SPEECH_GREET_REPLY',0
.rdata:00007FF687039818 aSpeechSlayer db 'SPEECH_SLAYER',0
.rdata:00007FF687039828 aSpeechThreat db 'SPEECH_THREAT',0
.rdata:00007FF687039838 aSecretDeath db 'SECRET_DEATH',0
.rdata:00007FF687039848 aSpeechGeneral db 'SPEECH_GENERAL',0
.rdata:00007FF687039858 aBookInstructio db 'BOOK_INSTRUCTION',0
.rdata:00007FF687039870 aBookArt db 'BOOK_ART',0
.rdata:00007FF687039880 aSpeechGoodbyeW_1 db 'SPEECH_GOODBYE_WORSHIP_3',0
.rdata:00007FF6870398A0 aSpeechTempleAl db 'SPEECH_TEMPLE_ALREADY_MEMBER',0
.rdata:00007FF6870398C0 aSpeechGoodbyeW db 'SPEECH_GOODBYE_WORSHIP_1',0
.rdata:00007FF6870398E0 aSpeechGoodbyeW_0 db 'SPEECH_GOODBYE_WORSHIP_2',0
.rdata:00007FF687039900 aSpeechGreetWor db 'SPEECH_GREET_WORSHIP',0
.rdata:00007FF687039918 aSpeechGreetBab db 'SPEECH_GREET_BABY',0
.rdata:00007FF687039930 aSpeechGreetRep_0 db 'SPEECH_GREET_REPLY_DIFF_LANGUAGE',0
.rdata:00007FF687039958 aSpeechGreetRep_1 db 'SPEECH_GREET_REPLY_UNUSUAL_FIRST',0
.rdata:00007FF687039980 aSpeechThiefPro_0 db 'SPEECH_THIEF_PROFESSION_YEAR',0
.rdata:00007FF6870399A0 aSpeechPastWand db 'SPEECH_PAST_WANDERING_PROFESSION',0
.rdata:00007FF6870399C8 aSpeechHuntingP_0 db 'SPEECH_HUNTING_PROFESSION_YEAR',0
.rdata:00007FF6870399E8 aSpeechSnatcher_0 db 'SPEECH_SNATCHER_PROFESSION_YEAR',0
.rdata:00007FF687039A08 aSpeechAnimalSl db 'SPEECH_ANIMAL_SLAYER',0
.rdata:00007FF687039A20 aSpeechWanderin_0 db 'SPEECH_WANDERING_PROFESSION_YEAR',0
.rdata:00007FF687039A48 aSpeechCurrentP_0 db 'SPEECH_CURRENT_PROFESSION_YEAR',0
.rdata:00007FF687039A68 aSpeechHistFigS db 'SPEECH_HIST_FIG_SLAYER',0
.rdata:00007FF687039A80 aSpeechPastMerc db 'SPEECH_PAST_MERCENARY_PROFESSION',0
.rdata:00007FF687039AA8 aSpeechMercenar db 'SPEECH_MERCENARY_PROFESSION',0
.rdata:00007FF687039AC8 aSpeechMercenar_0 db 'SPEECH_MERCENARY_PROFESSION_YEAR',0
.rdata:00007FF687039AF0 aSpeechPastThie db 'SPEECH_PAST_THIEF_PROFESSION',0
.rdata:00007FF687039B10 aSpeechGreetRep_2 db 'SPEECH_GREET_REPLY_AFTER_HERO',0
.rdata:00007FF687039B30 aSpeechPastHunt db 'SPEECH_PAST_HUNTING_PROFESSION',0
.rdata:00007FF687039B50 aSpeechPastSnat db 'SPEECH_PAST_SNATCHER_PROFESSION',0
.rdata:00007FF687039B70 aSpeechWanderin db 'SPEECH_WANDERING_PROFESSION',0
.rdata:00007FF687039B90 aSpeechHuntingP db 'SPEECH_HUNTING_PROFESSION',0
.rdata:00007FF687039BB0 aSpeechFamilyRe_4 db 'SPEECH_FAMILY_RELATIONSHIP_ADDITIONAL_DEAD',0
.rdata:00007FF687039BE0 aSpeechChildAge db 'SPEECH_CHILD_AGE_PROCLAMATION',0
.rdata:00007FF687039C00 aSpeechFamilyRe_2 db 'SPEECH_FAMILY_RELATIONSHIP_SPEC_DEAD',0
.rdata:00007FF687039C28 aSpeechFamilyRe_3 db 'SPEECH_FAMILY_RELATIONSHIP_NO_SPEC_DEAD',0
.rdata:00007FF687039C50 aSpeechFamilyRe_0 db 'SPEECH_FAMILY_RELATIONSHIP_NO_SPEC',0
.rdata:00007FF687039C78 aSpeechFamilyRe_1 db 'SPEECH_FAMILY_RELATIONSHIP_ADDITIONAL',0
.rdata:00007FF687039CA0 aSpeechPastProf_0 db 'SPEECH_PAST_PROFESSION_YEAR',0
.rdata:00007FF687039CC0 aSpeechCurrentP db 'SPEECH_CURRENT_PROFESSION_NO_YEAR',0
.rdata:00007FF687039CE8 aSpeechSoldierP db 'SPEECH_SOLDIER_PROFESSION',0
.rdata:00007FF687039D08 aSpeechPastProf db 'SPEECH_PAST_PROFESSION_NO_YEAR',0
.rdata:00007FF687039D28 aSpeechGuardPro db 'SPEECH_GUARD_PROFESSION',0
.rdata:00007FF687039D40 aSpeechGuardWar db 'SPEECH_GUARD_WARNING',0
.rdata:00007FF687039D58 aSpeechThiefPro db 'SPEECH_THIEF_PROFESSION',0
.rdata:00007FF687039D70 aSpeechSnatcher db 'SPEECH_SNATCHER_PROFESSION',0
.rdata:00007FF687039D90 aSpeechSameSite db 'SPEECH_SAME_SITE_AB_SPECIFIC_HF_SEEKER',0
.rdata:00007FF687039DB8 aSpeechSameSite_0 db 'SPEECH_SAME_SITE_SPECIFIC_HF_SEEKER',0
.rdata:00007FF687039DE0 aSpeechAbSpecif db 'SPEECH_AB_SPECIFIC_HF_SEEKER',0
.rdata:00007FF687039E00 aSpeechSiteSpec db 'SPEECH_SITE_SPECIFIC_HF_SEEKER',0
.rdata:00007FF687039E20 aSpeechTaskReco db 'SPEECH_TASK_RECOMMENDATION',0
.rdata:00007FF687039E40 aSpeechUnknownH db 'SPEECH_UNKNOWN_HF_SEEKER',0
.rdata:00007FF687039E60 aSpeechTempleBe db 'SPEECH_TEMPLE_BECOME_MEMBER',0
.rdata:00007FF687039E80 aSpeechPositive db 'SPEECH_POSITIVE',0
.rdata:00007FF687039E90 aSpeechNoFamily db 'SPEECH_NO_FAMILY',0
.rdata:00007FF687039EA8 aSpeechFamilyRe db 'SPEECH_FAMILY_RELATIONSHIP_SPEC',0
.rdata:00007FF687039EC8 aSpeechJustific_2 db 'SPEECH_JUSTIFICATION_REMINDER',0
.rdata:00007FF687039EE8 aSpeechJustific_3 db 'SPEECH_JUSTIFICATION_ANTITHETICAL',0
.rdata:00007FF687039F10 aSpeechJustific_0 db 'SPEECH_JUSTIFICATION_PROXIMITY',0
.rdata:00007FF687039F30 aSpeechJustific_1 db 'SPEECH_JUSTIFICATION_EXPERIENCE',0
.rdata:00007FF687039F50 aSpeechArchInfo db 'SPEECH_ARCH_INFO_JUSTIFICATION',0
.rdata:00007FF687039F70 aSpeechJustific db 'SPEECH_JUSTIFICATION_REPRESENTATION',0

This is incorrect. You can define your own text sets just fine. Please don't spread misinformation.

In general: just because the string dump has a list of hardcoded IDs doesn't mean you can't add your own. You'll also find [SYN_AFFECTED_CLASS:GENERAL_POISON] in the string dump, but it doesn't mean GENERAL_POISON is the only valid entry for SYN_AFFECTED_CLASS.

You find that in the string dump because there's a list of hardcoded text sets the game might want to use and it has to associate that list with some strings, not because those are the only ones allowed. There's code allowing for new text sets to be defined all over the place.

Also, your list of "the only text set definitions that will do anything" doesn't even include every vanilla text set. It's missing dwarf/elf/goblin slayer speech.

So yeah, please avoid being too gung ho about this stuff. At least test it a little first.
« Last Edit: March 25, 2023, 03:44:53 am by Putnam »
Logged