A dialogue file may be a lot of code, with many answer possibilities depending upon the real and effective race of the player, and depending upon the classes of the player, but structurally and algorithmically its extremely simple, and thus easy to read, understand, and if necessary bugfix, and thus its not spagetti code.

Namely if you are for example a Halfling using Disguise Self into a Drow, you will get both Halfling and Drow answer options, if they are both available.

Likewise if you are for example a multiclass Cleric and Wizard, you will get both Cleric and Wizard answer options.

If both race and class answer options are available, they will both be listed.

Etc.