How do I make a church?
So you want to make a church? A church is a place where the heroes are revived. Most of the time it is cheap to prevent the player from beeing stucked because of a lack of money. A always, there are two main ways to do it. Another particularity is that its genrerally give only a small amount of HP back so that the INN does not lose its reasons to be. The church can also offer other services such as anti-poisonning, spell learning, or saving.
If you are using a Shop that comes with Custom.exe
The shop that is the closest to what we want in term of healing is of course a church that has INN habilities. But there are 3 main things that we may want to change. First when we you use an INN made with the shop menu you see the phrase "The INN costs" (or we try to make an INN) and secondly the INN fully restored HP & MP as bonus with reviving. We have already seen in the article "How can I make it so that an inn restores HP, but not MP?" that we can prevent the INN to get back MP. so we'll need this technic too. We'll let the INN do its things and then undo the parts that has been does that we don't want. And least but not least take into account that the code automatically show up all the members in the active party whereas they have 5/20 hp or 0/30 hp.
If you choose to use the inn function for your church, I advise you strongly then to make your own INN from scratch... and vice-versa. Else the gameplay and the game menus will look very strange.
So how do we start?
First go under custom.Exe, editing the preference bitsets and activate the bitset "Inns Revive Dead Heroes". Then edit the global text strings. Search for the line: the Inn costs $. Change this line to "donation amount". Then go into the shop. as you learned in the how to, pick up a free shop and name it church. Edit the shop ability and make it an INN. Give a price. Let's say $10
Then edit your textboxes. We need five text boxes.
The first (text box 31)
Priest: You want me to revice hero? I'm sorry but you appear to not have enough money.
The second (text box 32)
Narration: Dead heroes have been revived!
The third (text box 33)
Priest : You're alive now. May you continue your journey in peace.
The fourth (text box 34)
Priest : Hello my son! What can I do for you?
The fifth (text box 35)
Priest : I've got wonderful news! All your heroes look healthy and doesn't need my help!
If you are using your own script to make you Church
It might be more difficult to do so if you have made your own Inn but not impossible. We're using the same commands but in a slightly similar way. We have seen in the article How do I prevent a dead hero from reviving at the Inn? how to make a reviving point. So we're going to strat from that.
If you remember weel, we're using variables that checks that the Hp of the heroes is 0, and if so, we want the script to restore our stats.
script, reviving point, begin suspend player suspend npcs if (check tag (tag: go to revive)==On)then, begin variable (hero0 hp, hero1 hp, hero2 hp, hero3 hp) hero0 hp:= get hero stat (0,stat:hp,current stat) hero1 hp:= get hero stat (1,stat:hp,current stat) hero2 hp:= get hero stat (2,stat:hp,current stat) hero3 hp:= get hero stat (3,stat:hp,current stat) If (hero0 hp == 0) then, begin # if hero 0 has no Hp then begin set hero stat(0,stat:hp, get hero stat(0,stat:hp,maximum stat)/6) show text box (45) #priest: good luck may the lord be with you wait for text box end, else, begin If (hero1 hp == 0) then, begin # if hero 1 has less 1hp then begin.. set hero stat(1,stat:hp, get hero stat(1,stat:hp,maximum stat)/5) show text box (45) #priest: good luck may the lord be with you wait for text box end, else, begin If (hero2 hp == 0) then, begin set hero stat(2,stat:hp, get hero stat(2,stat:hp,maximum stat)/5) show text box (45) wait for text box end, else, begin If (hero3 hp == 0) then, begin set hero stat(3,stat:hp, get hero stat(3,stat:hp,maximum stat)/5) show text box (45) wait for text box end, else, begin show text box (13)# sorry buy it seems that you don't need my service wait for text box resume player resume npcs end# end for last else, begin end # ends for the ifs end end end resume player resume npcs end #end of the plotscript