Essentail comments are missing in decompiled quest scripts. If these comments are missing, the quest stages scripts will not load the source fragments during editing.
The first two lines of a quest script must be:
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX X
where X is the free next index of fragment functions in the script. For example if there are three fragment Fragment_0(), Fragment_1(), Fragment_2(), the index should be 3.
I'm not sure if this can be applied with non contiguous fragments (which should NOT occurs).
For example if we have Fragment_0(), Fragment_2(), Fragment_3(), the next free index should be 1 or 4?
Anyway, every Fragment function must have these comment wrappers (X mean the nth fragment):
;BEGIN FRAGMENT Fragment_X
Function Fragment_X()
;BEGIN CODE
...Script stuff...
;END CODE
EndFunction
;END FRAGMENT
Also, aliases should be wrapped too. I think is not necessary but it would be good if they're added. So, let's do an example:
;BEGIN ALIAS PROPERTY myFancyNamedAlias
;ALIAS PROPERTY TYPE LocationAlias
LocationAlias Property Alias_myFancyNamedAlias Auto
;END ALIAS PROPERTY
The property name in the first comment is the same as the property declaration without Alias_ prefix
The last line of the script must have:
;END FRAGMENT CODE - Do not edit anything between this and the begin comment
Lastly, I'm not sure if - Do not edit anything between this and the end comment and - Do not edit anything between this and the begin comment are necessary or not... Just in case, add them.
Essentail comments are missing in decompiled quest scripts. If these comments are missing, the quest stages scripts will not load the source fragments during editing.
The first two lines of a quest script must be:
where
Xis the free next index of fragment functions in the script. For example if there are three fragmentFragment_0(),Fragment_1(),Fragment_2(), the index should be3.I'm not sure if this can be applied with non contiguous fragments (which should NOT occurs).
For example if we have
Fragment_0(),Fragment_2(),Fragment_3(), the next free index should be1or4?Anyway, every Fragment function must have these comment wrappers (X mean the nth fragment):
Also, aliases should be wrapped too. I think is not necessary but it would be good if they're added. So, let's do an example:
The property name in the first comment is the same as the property declaration without
Alias_prefixThe last line of the script must have:
;END FRAGMENT CODE - Do not edit anything between this and the begin commentLastly, I'm not sure if
- Do not edit anything between this and the end commentand- Do not edit anything between this and the begin commentare necessary or not... Just in case, add them.