Page 1 of 1

%reg likely not giving current region in all instances but rather give region related to specific context

Posted: Fri May 18, 2018 10:44 pm
by Nystul
%reg is currently implemented to return current region

I think this is behaving differently in vanilla, see an entry from text record 1480 from text.rsc:
The noble ruler, %ol1 %olf. Long live %fl1, newly made %lt1 of %reg.

which resolves in Daggerfall to something like
"The noble ruler, [a name for old ruler faction1] fell and struck his head. Long live [name of new ruler faction1], newly made [title of ruler] of [faction1 region]."
with faction1 being any random region without a fixed ruler (can be different than current region)...

I think only %crn should return current region

I would like to change %reg but need to know where it is used elsewhere (and who implemented %reg - was it just implemented that way because of lack of knowledge or was there a good reason for it?)

Re: %reg likely not giving current region in all instances but rather give region related to specific context

Posted: Fri May 18, 2018 10:59 pm
by Interkarma
That's a good observation, and makes perfect sense in that context.

After having a search through the quest files, it does appear that %reg is used for current region in many cases.

Maybe that macro should expand equal to current region in quests and to a ruler-less region in generated rumours?

Re: %reg likely not giving current region in all instances but rather give region related to specific context

Posted: Fri May 18, 2018 11:33 pm
by Nystul
thats how I plan to implement it

Re: %reg likely not giving current region in all instances but rather give region related to specific context

Posted: Sat May 26, 2018 7:53 am
by R.D.
The way it works in classic is that it's always the current region except for when the game is writing a rumor to RUMORS.DAT. When writing a rumor it's temporarily set to a specified region or to a random region, the rumor is written to the file, and then it's returned to the current region.

Re: %reg likely not giving current region in all instances but rather give region related to specific context

Posted: Sat May 26, 2018 8:00 am
by Interkarma
Awesome thanks Allofich!