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

Discuss coding questions, pull requests, and implementation details.
Post Reply
User avatar
Nystul
Posts: 1198
Joined: Mon Mar 23, 2015 8:31 am

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

Post by Nystul » Fri May 18, 2018 10:44 pm

%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?)

User avatar
Interkarma
Posts: 3619
Joined: Sun Mar 22, 2015 1:51 am

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

Post by Interkarma » Fri May 18, 2018 10:59 pm

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?

User avatar
Nystul
Posts: 1198
Joined: Mon Mar 23, 2015 8:31 am

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

Post by Nystul » Fri May 18, 2018 11:33 pm

thats how I plan to implement it

R.D.
Posts: 326
Joined: Fri Oct 07, 2016 10:41 am

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

Post by R.D. » Sat May 26, 2018 7:53 am

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.
Last edited by R.D. on Sat May 26, 2018 8:29 am, edited 2 times in total.


Post Reply