[File Guide] - Shrines.txt [v1.1x]

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

Post Reply

0
No votes
 
Total votes: 0

User avatar
Drac0
Retired staff
Angel
Posts: 589
Joined: Tue Sep 24, 2002 2:24 am
Location: Nowra NSW, Australia
Contact:

[File Guide] - Shrines.txt [v1.1x]

Post by Drac0 » Mon Oct 10, 2011 6:01 am

Shrines.txt File Guide [v1.1x]
By Drac0
v1.0, 09 Oct 2011


Shrines.txt is a small, simple file where the majority of columns are comments only. It is referenced by several other files & the game code. The only file it links directly to is Levels.txt.

Shrine Type: (comment only) Defines what type the shrine is:
Recharge – recharges stat points.
Booster – temporary boosts to stats/skills etc.
Magic – all other shrine types (portal, gem, etc).

Shrine Name: (comment only) Name of the shrine.


Effect: (comment only) A brief description of the effect of the shrine. You will notice that a number of the shrines are marked with ‘(OUT)’. These are unused/non-functioning shrines. It appears the code for these is very buggy, making them un-useable.

You will also see normal health/mana shrines are missing. This is because the unused shrines are still in the shrine picking code & when a health/mana boost/exchange is picked it is replaced with a normal health/mana shrine. If the other unused shrine is selected (Shrine of Enirhs) it is replaced by a gem shrine.

Code: The shrines ID number, referenced by both other files & code. Also links the shrine to its string file entry (hardcoded I believe) using the format ShrId[x] where [x] is the ID number from this column.

Arg0/Arg1: The parameter settings for the shrines, for example the percentage recharge of health/mana shrines.

Duration in frames: Duration of the effects of the shrine, 0 = instant, other = divide by 25 to get duration in seconds (1 sec in D2 is 25 frames). These figures appear to be a maximum with the minimum of ~75%.

reset time in minutes: How many minutes before you can use that particular shrine again, 0 = once only. Blizzard made an error in the code so here a minute only equals 48 seconds so a 2 minute timer is actually only 1:36 & a 5 minute one only 4 minutes (thanks to Necrolis for pointing this out). Like duration these figures appear to be a maximum, with the minimum at ~75%.

Rarity: (Comment only) Not used, the 'Parm0' column from Objects.txt is used to determine the shrine type.

view name & niftyphrase: (comment only) Not used.

effectclass: Sets the effect of the shrine.
0 = null
1 = shrines that don’t affect the player directly.
2 & 3 = unused by active shrines. May limit the effect to either health (2) or mana (3).
4 = changes to player stats.

LevelMin: This is the level ID from Levels.txt & specifies the earliest area the shrine can spawn in. For example, a Resist Cold shrine has 26 here, meaning you usually won’t get one before the Monastery in Act 1. There is a point in the shrine selection code where if all else fails it will place the last shrine it tried, meaning on rare occasions you will get a shrine type earlier than expected.

Thanks to nefarius for his guide on how the shrine code works.

Comments & corrections welcome.

Edit - 16 Oct 2011: Spelling & duration/reset info edited.
Edit - 19 Oct 2011: Fixed Rarity column information.
Last edited by Drac0 on Wed Oct 19, 2011 7:29 am, edited 8 times in total.

User avatar
Necrolis
Site Admin
Throne
Posts: 8997
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: Shrines.txt File Guide [LoD v1.1x]

Post by Necrolis » Mon Oct 10, 2011 7:43 am

Shrines use the wrong multiplier for reset time, so its really 48 seconds per 'minute' instead of 60
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
Drac0
Retired staff
Angel
Posts: 589
Joined: Tue Sep 24, 2002 2:24 am
Location: Nowra NSW, Australia
Contact:

Re: Shrines.txt File Guide [LoD v1.1x]

Post by Drac0 » Mon Oct 10, 2011 8:47 am

Necrolis" wrote:Shrines use the wrong multiplier for reset time, so its really 48 seconds per 'minute' instead of 60
Actually, both the duration & reset seems out somewhere. Did a quick test with a skill shrine & the duration was 400 frames short. The reset time worked out at only 42secs for a 'minute'.

Are these figures altered somewhere along the way somehow? Going to do more testing to see if this variation is constant.

User avatar
Necrolis
Site Admin
Throne
Posts: 8997
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: [File Guide] - Shrines.txt [v1.1x]

Post by Necrolis » Mon Oct 10, 2011 9:33 am

They aren't altered at all, blizzard just can't do math, they used 20 frames per second instead of 25...
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
Drac0
Retired staff
Angel
Posts: 589
Joined: Tue Sep 24, 2002 2:24 am
Location: Nowra NSW, Australia
Contact:

Re: [File Guide] - Shrines.txt [v1.1x]

Post by Drac0 » Mon Oct 10, 2011 12:40 pm

Necrolis" wrote:They aren't altered at all, blizzard just can't do math, they used 20 frames per second instead of 25...
Strange. On half a dozen tests using the same character & the same skill shrine I got variations between 78 secs & 87 secs for duration & 201 secs & 215 secs for reset times. Could it be the figures in the file are only maximums?

EDIT: Beginning to think the code for the durations isn't functional, at least on these 2 columns. Further testing hs shown that all shrines seem to reload in about 200-215 secs, regardless of the figures in the reset column. Duration seems to be anything from around 80% to 95% of the frames listed.

Tested this in 1.10f & 1.13c with the same results. Tried skill, health, mana, xp & stamina shrines before I got too bored waiting for them to reset. :D

User avatar
Necrolis
Site Admin
Throne
Posts: 8997
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: [File Guide] - Shrines.txt [v1.1x]

Post by Necrolis » Mon Oct 10, 2011 2:17 pm

Drac0" wrote:
Necrolis" wrote:They aren't altered at all, blizzard just can't do math, they used 20 frames per second instead of 25...
Strange. On half a dozen tests using the same character & the same skill shrine I got variations between 78 secs & 87 secs for duration & 201 secs & 215 secs for reset times. Could it be the figures in the file are only maximums?

EDIT: Beginning to think the code for the durations isn't functional, at least on these 2 columns. Further testing hs shown that all shrines seem to reload in about 200-215 secs, regardless of the figures in the reset column. Duration seems to be anything from around 80% to 95% of the frames listed.

Tested this in 1.10f & 1.13c with the same results. Tried skill, health, mana, xp & stamina shrines before I got too bored waiting for them to reset. :D
its functional, just see nefarius' post on shrines for 1.11b (why my 1.10 in there as well)
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
Drac0
Retired staff
Angel
Posts: 589
Joined: Tue Sep 24, 2002 2:24 am
Location: Nowra NSW, Australia
Contact:

Re: [File Guide] - Shrines.txt [v1.1x]

Post by Drac0 » Mon Oct 10, 2011 3:33 pm

I've actually read it, several times. While there is a lot I don't understand, I did pick up a few things.

I don't know enough to be able to work through the code, but there must be somewhere in there where the final timers are given a bit of randomness. They stuffed up when they multiplied the minutes by 1200 not 1500. This means that a 2 minute time is actually 1:36 & 4 mins instead of 5. Because it just doesn't work with set times in game.

In more testing I have had 1 shrine (exp) go the full frames duration (144 secs) & 1 (stam) go the full 4 mins for a reset. All others fall in a region from 75% up.

So there has to be something more in the code.

User avatar
LastCorpse
Posts: 17
Joined: Sun Mar 20, 2011 1:58 am

Re: [File Guide] - Shrines.txt [v1.1x]

Post by LastCorpse » Mon Oct 17, 2011 10:37 pm

Shouldn't a higher rarity value _increase_ the probability for this shrine type (such as rarity column in MonStats.txt or frequency in MagicPrefix/Suffix.txt)?

Anyway, are you sure that this isn't only a reference field? I've modified some of those values, but they didn't seem to have any effect.

User avatar
Drac0
Retired staff
Angel
Posts: 589
Joined: Tue Sep 24, 2002 2:24 am
Location: Nowra NSW, Australia
Contact:

Re: [File Guide] - Shrines.txt [v1.1x]

Post by Drac0 » Wed Oct 19, 2011 7:16 am

LastCorpse" wrote:Shouldn't a higher rarity value _increase_ the probability for this shrine type (such as rarity column in MonStats.txt or frequency in MagicPrefix/Suffix.txt)?

Anyway, are you sure that this isn't only a reference field? I've modified some of those values, but they didn't seem to have any effect.
Went back & checked nefarius' shrine code post & it looks like it uses the Parm0 column from Objects.txt to determine what type of shrine to select. In that file all the shrine types have a 1, 2 or 3. A 1 is a health shrine, 2 is a mana shrine & 3 gets you either a booster or magic shrine.

My bad for not checking properly, thanks fo the heads-up.

Cheers

Post Reply

Return to “General Mod Making”