CamDawg Posted September 14, 2006 Share Posted September 14, 2006 Starting with version 4, Divine Remix has a new system to allow other mod authors to apply the sphere system to their own mods. It can also be used for simpler things, like compatibility--divine kit mods installed after DR won't have any spells to cast, as noted in the readme. Following this tutorial, you can eliminate this issue for your mods as well. First, an overview of how DR creates the sphere system. As we found through several frustrating releases, removing spells from divine casters is unreliable at best. The engine automatically puts spells of the name sppr[1-7][0-9][0-9] into divine spellbooks if the spell is of the correct type, defined by the two bytes at 0x20 in the spell files. DR removes this automatic granting of spells by changing the type of all spells of the name sppr[1-7][0-9][0-9] to invalid for all divine casters. The spells are added manually via the kit's ability tables, aka the CLAB 2da files. Adding to the spellbook through script or spells resulted in the cleric receiving experience points for 'learning' the spell. So, all of the CLAB files for DR are stuffed with entries like GA_SPPR101 and whatnot. The spellbook portion of these CLAB files are now built on the fly, in a fashion that third-party mods can use. As DR also imposes sphere restrictions upon HLAs, we also have tools for building HLA tables on the fly. Note that all of the code you see here should follow the ADD_KIT command. The first step is to detect DR of versions > 3. A simple ACTION_IF: // if DR > v3 is installed prior to my mod ACTION_IF ((FILE_EXISTS_IN_GAME ~cdnegpp.spl~) AND (FILE_EXISTS ~Divine_Remix/lib/macro_reindex_clab.tph~)) THEN BEGIN INCLUDE ~Divine_Remix/lib/extra_regexp_vars.tph~ // code for here follows END The include is required; it sets up extra variables we can use to match special characters such as newlines and tabs in the various macros. All of the code needed to build CLABs has been farmed out to included files and macroes. To use the code, you first need to figure out what macros are needed and include them from the DR folder: INCLUDE ~Divine_Remix/lib/macro_extend_clab_to_level_50.tph~ If your CLAB file does not extend to level 50, this macro will extend it. I recommend you do this manually, with or without planning on integrating with DR. Using CLABs that go to level 50 on a normal install has no effect, but extending them to 50 will greatly assist XP cap removers. INCLUDE ~Divine_Remix/lib/macro_remove_blank_lines_from_eof.tph~ As the name suggests, this will remove any blank lines or returns from the end of the file. This is a necessary clean-up step prior to adding HLAs or spells. INCLUDE ~Divine_Remix/lib/macro_reindex_clab.tph~ All of the code added to CLAB files will have an invalid first entry (i.e. instead of ABILITY1 it'll just be an xx). This macro, when run at the end, will make the first entries run properly from ABILITY1 to ABILITY99 (or wherever). This is a required finishing step. INCLUDE ~Divine_Remix/lib/macro_spell_remove_evil.tph~ INCLUDE ~Divine_Remix/lib/macro_spell_remove_neutral.tph~ INCLUDE ~Divine_Remix/lib/macro_spell_remove_good.tph~ DR imposes an additional restriction on spells based upon your deity's alignment. A good-aligned deity no longer grants spells unusable by good characters, i.e. Selune does not grant Unholy Blight or Unholy Word, even to her CN followers. Conversely, a LN Authlin of Iyachtu Xvim can not use Holy Smite or Holy Word. If you wish for your kit to impose these additional restrictions as well, include and use these macros. The macros should be launched just after adding the spells. Good deities should use the _good macro, neutral deities _neutral, and evil deities _evil. INCLUDE ~Divine_Remix/lib/macro_add_cleric_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_add_druid_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_add_paladin_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_add_ranger_spells.tph~ These four macros provide the spells appropriate for the trueclass version of these classes. If you wish to customize the sphere selection for your kit, this is addressed in the next post. If you want the default selection for your class, use these macros. INCLUDE ~Divine_Remix/lib/macro_shift_paladin_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_shift_ranger_spells.tph~ These two macros remove the addition of higher level spells for rangers and paladins, and shift them over so that they don't start accumulating until higher levels. In other words, this macro will trim a paladin down to just spells of level 1-4 and move them so that level 1 spells get added to the spellbook starting at character level 9. So, to actually use these, we first must include any macro we want. Let's use this for an example ranger kit with default ranger spell selection. (Let's assume we've already extended the CLAB to level 50 manually). First we include the needed macros from the DR folder: INCLUDE ~Divine_Remix/lib/macro_remove_blank_lines_from_eof.tph~ INCLUDE ~Divine_Remix/lib/macro_reindex_clab.tph~ INCLUDE ~Divine_Remix/lib/macro_add_ranger_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_shift_ranger_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_spell_remove_good.tph~ Next, we would copy our existing CLAB and run these macros on it: COPY_EXISTING ~myranger.2da~ ~override~ LAUNCH_PATCH_MACRO ~remove_blank_lines_from_eof~ // purge lines LAUNCH_PATCH_MACRO ~add_ranger_spells~ // add generic ranger spells LAUNCH_PATCH_MACRO ~spell_remove_good~ // removes evil, neutral-only spells LAUNCH_PATCH_MACRO ~shift_ranger_spells~ // shift generic ranger spells LAUNCH_PATCH_MACRO ~reindex_clab~ // re-index lines BUT_ONLY_IF_IT_CHANGES So, putting it all together: // your ADD_KIT command somewhere up here // if DR > v3 is installed prior to my mod ACTION_IF ((FILE_EXISTS_IN_GAME ~cdnegpp.spl~) AND (FILE_EXISTS ~Divine_Remix/lib/macro_reindex_clab.tph~)) THEN BEGIN INCLUDE ~Divine_Remix/lib/extra_regexp_vars.tph~ INCLUDE ~Divine_Remix/lib/macro_remove_blank_lines_from_eof.tph~ INCLUDE ~Divine_Remix/lib/macro_reindex_clab.tph~ INCLUDE ~Divine_Remix/lib/macro_add_ranger_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_shift_ranger_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_spell_remove_good.tph~ COPY_EXISTING ~myranger.2da~ ~override~ LAUNCH_PATCH_MACRO ~remove_blank_lines_from_eof~ // purge lines LAUNCH_PATCH_MACRO ~add_ranger_spells~ // add generic ranger spells LAUNCH_PATCH_MACRO ~spell_remove_good~ // removes evil, neutral-only spells LAUNCH_PATCH_MACRO ~shift_ranger_spells~ // shift ranger spells LAUNCH_PATCH_MACRO ~reindex_clab~ // re-index lines BUT_ONLY_IF_IT_CHANGES END Similarly, the code for adding generic spells to druids, clerics, and paladins is also fairly straightforward: // if DR > v3 is installed prior to my mod ACTION_IF ((FILE_EXISTS_IN_GAME ~cdnegpp.spl~) AND (FILE_EXISTS ~Divine_Remix/lib/macro_reindex_clab.tph~)) THEN BEGIN INCLUDE ~Divine_Remix/lib/extra_regexp_vars.tph~ INCLUDE ~Divine_Remix/lib/macro_remove_blank_lines_from_eof.tph~ INCLUDE ~Divine_Remix/lib/macro_reindex_clab.tph~ INCLUDE ~Divine_Remix/lib/macro_add_druid_spells.tph~ COPY_EXISTING ~mydruid.2da~ ~override~ LAUNCH_PATCH_MACRO ~remove_blank_lines_from_eof~ // purge lines LAUNCH_PATCH_MACRO ~add_druid_spells~ // add generic druid spells LAUNCH_PATCH_MACRO ~reindex_clab~ // re-index lines BUT_ONLY_IF_IT_CHANGES END // if DR > v3 is installed prior to my mod ACTION_IF ((FILE_EXISTS_IN_GAME ~cdnegpp.spl~) AND (FILE_EXISTS ~Divine_Remix/lib/macro_reindex_clab.tph~)) THEN BEGIN INCLUDE ~Divine_Remix/lib/extra_regexp_vars.tph~ INCLUDE ~Divine_Remix/lib/macro_remove_blank_lines_from_eof.tph~ INCLUDE ~Divine_Remix/lib/macro_reindex_clab.tph~ INCLUDE ~Divine_Remix/lib/macro_add_cleric_spells.tph~ // INCLUDE ~Divine_Remix/lib/macro_spell_remove_good.tph~ // optional--include good, evil, or neutral as appropriate COPY_EXISTING ~mydruid.2da~ ~override~ LAUNCH_PATCH_MACRO ~remove_blank_lines_from_eof~ // purge lines LAUNCH_PATCH_MACRO ~add_cleric_spells~ // add generic cleric spells // LAUNCH_PATCH_MACRO ~spell_remove_good~ // optional--include good, evil, or neutral as appropriate LAUNCH_PATCH_MACRO ~reindex_clab~ // re-index lines BUT_ONLY_IF_IT_CHANGES END // if DR > v3 is installed prior to my mod ACTION_IF ((FILE_EXISTS_IN_GAME ~cdnegpp.spl~) AND (FILE_EXISTS ~Divine_Remix/lib/macro_reindex_clab.tph~)) THEN BEGIN INCLUDE ~Divine_Remix/lib/extra_regexp_vars.tph~ INCLUDE ~Divine_Remix/lib/macro_remove_blank_lines_from_eof.tph~ INCLUDE ~Divine_Remix/lib/macro_reindex_clab.tph~ INCLUDE ~Divine_Remix/lib/macro_add_paladin_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_shift_paladin_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_spell_remove_good.tph~ COPY_EXISTING ~mypally.2da~ ~override~ LAUNCH_PATCH_MACRO ~remove_blank_lines_from_eof~ // purge lines LAUNCH_PATCH_MACRO ~add_paladin_spells~ // add generic paladin spells LAUNCH_PATCH_MACRO ~spell_remove_good~ // removes evil, neutral-only spells LAUNCH_PATCH_MACRO ~shift_paladin_spells~ // shift paladin spells LAUNCH_PATCH_MACRO ~reindex_clab~ // re-index lines BUT_ONLY_IF_IT_CHANGES END One additional note: druid remix also open up druids to NG, LN, CN, and NE alignments. If you want your kit to reflect the expanded choices when DR is installed the following will help you. When you use ADD_KIT mykitname, WeiDU creates a variable named %mykitname% which this code must use. Substitute it as appropriate, but note that it is case sensitive--mykitname is not the same as MyKitName or MYKITNAME. // your ADD_KIT mykitname goes here // if DR > v3 is installed prior to my mod ACTION_IF ((FILE_EXISTS_IN_GAME ~cdnegpp.spl~) AND (FILE_EXISTS ~Divine_Remix/lib/macro_reindex_clab.tph~)) THEN BEGIN // change my kit to use expanded DR druid alignments COPY_EXISTING ~alignmnt.2da~ ~override~ SET_2DA_ENTRY ("%mykitname%" + 19) 2 10 ~1~ // LN SET_2DA_ENTRY ("%mykitname%" + 19) 4 10 ~1~ // NG SET_2DA_ENTRY ("%mykitname%" + 19) 6 10 ~1~ // NE SET_2DA_ENTRY ("%mykitname%" + 19) 8 10 ~1~ // CN BUT_ONLY_IF_IT_CHANGES END If you only want your kit to open up to some of these alignments, delete the lines as needed. Link to comment
CamDawg Posted September 14, 2006 Author Share Posted September 14, 2006 If you want to get fancy, you can select spheres for your kit instead of using the generic spell selection. The spheres are appended one-by-one to your CLAB file and then re-indexed. There are two files that can be appended for every sphere, one for major and one for minor access. Basically, we're replacing the macro of adding spells, above, with simple file appends. It may be simpler to show one in action. Here's the Silver star of Selune from DR v4: // add spells to base abilities INCLUDE ~Divine_Remix/lib/macro_spell_remove_good.tph~ INCLUDE ~Divine_Remix/lib/macro_reindex_clab.tph~ COPY_EXISTING ~cdselune.2da~ ~override~ APPEND_FILE ~Divine_Remix/spheres/al_major.2da~ APPEND_FILE ~Divine_Remix/spheres/an_major.2da~ APPEND_FILE ~Divine_Remix/spheres/as_major.2da~ APPEND_FILE ~Divine_Remix/spheres/co_major.2da~ APPEND_FILE ~Divine_Remix/spheres/di_major.2da~ APPEND_FILE ~Divine_Remix/spheres/gu_major.2da~ APPEND_FILE ~Divine_Remix/spheres/he_major.2da~ APPEND_FILE ~Divine_Remix/spheres/ne_major.2da~ APPEND_FILE ~Divine_Remix/spheres/nu_major.2da~ APPEND_FILE ~Divine_Remix/spheres/su_major.2da~ APPEND_FILE ~Divine_Remix/spheres/sn_major.2da~ APPEND_FILE ~Divine_Remix/spheres/tr_major.2da~ APPEND_FILE ~Divine_Remix/spheres/we_major.2da~ APPEND_FILE ~Divine_Remix/spheres/cm_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/ex_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/ea_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/ee_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/ef_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/ew_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/pl_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/wd_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/lastline.2da~ LAUNCH_PATCH_MACRO ~spell_remove_good~ // removes neutral- and evil-only spells LAUNCH_PATCH_MACRO ~reindex_clab~ // re-index lines BUT_ONLY_IF_IT_CHANGES Every sphere has a two letter code. To add sphere access, you simply append the major or minor file (as appropriate) and then add the last line and re-index the whole shebang. The last line merely calls for a spell that imposes personal alignment restrictions upon the character--a LN Authlim of Xvim can not cast an evil-only spell, even though his deity would be willing to grant it. The codes for the spheres are as follows: al - All an - Animal as - astral cm - Charm co - Combat cr - Creation cs - Chaos di - Divination ea - Elemantal (air) ee - Elemental (earth) ef - Elemental (fire) ew - Elemental (water) ex - Elemenal (all) gu - Guardian he - Healing lw - Law ne - Necromantic nu - Numbers pl - Plant pr - Protection sn - Sun su - Summoning th - Thought tr - Travel wa - War wd - Wards we - Weather Note that if the kit has access to Elemental (all), you should add the Elemental (all) plus all four of the individual elemental files. As a first step, you should also run the macro remove_blank_lines_from_eof as a safety precaution. These same files can be used for any of the classes, but keep in mind that rangers and paladins still need their respective shift macros to ensure they're not getting higher level spells in their spellbook or receiving spells too early. Link to comment
CamDawg Posted September 14, 2006 Author Share Posted September 14, 2006 OK, groovy, we've got normal spells sorted, even using custom spheres. How about those HLAs? Unlike the CLABs, HLAs are limited in length to a magic 24 lines for the 24 available slots. You may find it easier to maintain two HLA tables, one for DR and for non-DR installs. For the DR one, trim all empty rows and remove any entries for the spell-based HLAs such as Summon Deva, Aura of Flaming Death, etc.--the DR macros will append extra entries to fill up the 24 rows and index them for you. Note that non-spell HLAs should still be included, i.e. Silverstars get access to special priest versions of tracking and evade, so their table looks like this: 2DA V1.0 * ABILITY ICON STRREF MIN_LEV MAX_LEVEL NUM_ALLOWED PREREQUISITE EXCLUDED_BY ALIGNMENT_RESTRICT 1 GA_CDPREVD * * 1 99 16 * * * 2 GA_CDPRTRK * * 1 99 1 * GA_CDPRTRK * Detecting DR and installing the correct HLA table is simple enough: ACTION_IF FILE_EXISTS_IN_GAME ~mel01.cre~ THEM BEIGN // ToB check // your normal ToB-only stuff here ACTION_IF ((FILE_EXISTS_IN_GAME ~cdnegpp.spl~) AND (FILE_EXISTS ~Divine_Remix/lib/macro_reindex_clab.tph~)) THEN BEGIN // if DR > v3 installed COPY ~MyMod/lufoo_dr_version.2da~ ~override/lufoo.2da~ // code to go here follows END ELSE BEGIN // if no DR COPY ~MyMod/lufoo_normal_version.2da~ ~override/lufoo.2da~ END END You'll find that the HLA system is remarkably similar to the spell system. The remove_blank_lines_from_eof macro is used here again, but the rest of the needed macros are different. INCLUDE ~Divine_Remix/lib/macro_build_hla_table.tph~ // macro for building HLA tables This macro is the clean-up macro that sorts your final HLA table, removes duplicate entries, and re-indexes it. INCLUDE ~Divine_Remix/lib/macro_add_cleric_hlas.tph~ // adds generic cleric HLAs INCLUDE ~Divine_Remix/lib/macro_add_druid_hlas.tph~ // adds generic druid HLAs Adds HLAs appropriate to a normal cleric or druid. INCLUDE ~Divine_Remix/lib/macro_hla_remove_good.tph~ // removes evil- and neutral-only HLAs from table for good deities INCLUDE ~Divine_Remix/lib/macro_hla_remove_neutral.tph~ // removes evil- and good-only HLAs from table for neutral deitiesINCLUDE ~Divine_Remix/lib/macro_hla_remove_evil.tph~ // removes good- and neutral-only HLAs from table for evil deities DR has one additional restriction for its druids and clerics with regards to HLAs which you can choose to implement: good-aligned deities won't even offer evil HLAs, even to their neutral followers. For example, a CN Silverstar of Selune will not have Summon Fallen Deva as an option when selecting HLAs. Conversely, a LN Authlim of Iyachtu Xvim can not select Summon Deva. If you wish these additional restrictions for your kit, include and launch the appropriate macro. An example of these in action, again from the Silverstar of Selune in DR v4: INCLUDE ~Divine_Remix/lib/macro_build_hla_table.tph~ INCLUDE ~Divine_Remix/lib/macro_hla_remove_good.tph~ // removes evil- and neutral-only HLAs from table COPY ~Divine_Remix/cleric/Selune/lucd3.2da~ ~override~ // HLA file APPEND_FILE ~Divine_Remix/spheres/al_hla.2da~ APPEND_FILE ~Divine_Remix/spheres/an_hla.2da~ APPEND_FILE ~Divine_Remix/spheres/as_hla.2da~ APPEND_FILE ~Divine_Remix/spheres/co_hla.2da~ APPEND_FILE ~Divine_Remix/spheres/di_hla.2da~ APPEND_FILE ~Divine_Remix/spheres/gu_hla.2da~ APPEND_FILE ~Divine_Remix/spheres/he_hla.2da~ APPEND_FILE ~Divine_Remix/spheres/ne_hla.2da~ APPEND_FILE ~Divine_Remix/spheres/nu_hla.2da~ APPEND_FILE ~Divine_Remix/spheres/su_hla.2da~ APPEND_FILE ~Divine_Remix/spheres/sn_hla.2da~ APPEND_FILE ~Divine_Remix/spheres/tr_hla.2da~ APPEND_FILE ~Divine_Remix/spheres/we_hla.2da~ LAUNCH_PATCH_MACRO ~hla_remove_good~ // removes evil-aligned HLAs LAUNCH_PATCH_MACRO ~build_hla_table~ // re-order HLAs, remove dupes, and re-index Note that the two-letter code for HLAs are the same as for spells; the table is above. If you wish to use generic cleric or druid HLA tables, the following would work: INCLUDE ~Divine_Remix/lib/macro_build_hla_table.tph~ INCLUDE ~Divine_Remix/lib/macro_add_cleric_hlas.tph~ COPY ~Divine_Remix/cleric/Selune/lufoo.2da~ ~override~ // HLA file LAUNCH_PATCH_MACRO ~remove_blank_lines_from_eof~ // purge lines LAUNCH_PATCH_MACRO ~add_cleric_hlas~ // add generic cleric HLAs LAUNCH_PATCH_MACRO ~build_hla_table~ // re-order HLAs, remove dupes, and re-index INCLUDE ~Divine_Remix/lib/macro_build_hla_table.tph~ INCLUDE ~Divine_Remix/lib/macro_add_druid_hlas.tph~ COPY ~Divine_Remix/cleric/Selune/lufoo.2da~ ~override~ // HLA file LAUNCH_PATCH_MACRO ~remove_blank_lines_from_eof~ // purge lines LAUNCH_PATCH_MACRO ~add_druid_hlas~ // add generic druid HLAs LAUNCH_PATCH_MACRO ~build_hla_table~ // re-order HLAs, remove dupes, and re-index The macro remove_blank_lines_from_eof should already be defined from your modifications to the CLAB file, so you shouldn't need to include it again. If there are any questons or comments, please post below. Link to comment
Andyr Posted September 14, 2006 Share Posted September 14, 2006 INCLUDE ~Divine_Remix/lib/macro_add_ranger_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_shift_ranger_spells.tph~ These two macros remove the addition of higher level spells for rangers and paladins, and shift them over so that they don't start accumulating until higher levels. In other words, this macro will trim a paladin down to just spells of level 1-4 and move them so that level 1 spells get added to the spellbook at character level 9. I'm not sure I understand this one--if you don't do this, what will happen? Link to comment
CamDawg Posted September 14, 2006 Author Share Posted September 14, 2006 Spells would be added to the ranger/paladin spellbook at the same levels as they would be for clerics/druids--i.e. rangers would get first level spells in their spellbook at character level one, level two spells at character level three, etc. They would also receive spells for levels they could never cast, i.e. paladins would receive spells of levels 5-7. Keep in mind, these are only spells added to the spellbook, so it's more or less cosmetic. They still would not be able to cast them until they reached the appropriate level and there's no way to cast spells beyond their normal limits (paladins still won't be able to cast level 5+ spells despite having them in the spellbook). Link to comment
Andyr Posted September 15, 2006 Share Posted September 15, 2006 Oh, gotcha. Makes sense now! Link to comment
NiGHTMARE Posted September 15, 2006 Share Posted September 15, 2006 INCLUDE ~Divine_Remix/lib/macro_add_cleric_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_add_druid_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_add_paladin_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_shift_paladin_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_add_ranger_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_shift_ranger_spells.tph~ Shouldn't these read: INCLUDE ~Divine_Remix/lib/macro_add_cleric_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_add_druid_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_add_paladin_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_add_ranger_spells.tph~ and INCLUDE ~Divine_Remix/lib/macro_shift_paladin_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_shift_ranger_spells.tph~ Link to comment
CamDawg Posted September 15, 2006 Author Share Posted September 15, 2006 Whoops! Thanks, it's fixed. Link to comment
yarpen Posted September 30, 2006 Share Posted September 30, 2006 Hi! I'm making now paladin and ranger kits for my kitpack. And got little question - can you check that? zealot - spheres (combat, divination, law, protection, war): ACTION_IF ((FILE_EXISTS_IN_GAME ~cdnegpp.spl~) AND (FILE_EXISTS ~Divine_Remix/lib/macro_reindex_clab.tph~)) THEN BEGIN INCLUDE ~Divine_Remix/lib/extra_regexp_vars.tph~ INCLUDE ~Divine_Remix/lib/macro_spell_remove_evil.tph~ INCLUDE ~Divine_Remix/lib/macro_shift_paladin_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_reindex_clab.tph~ COPY_EXISTING ~y#zealo.2da~ ~override~ APPEND_FILE ~Divine_Remix/spheres/co_major.2da~ APPEND_FILE ~Divine_Remix/spheres/di_major.2da~ APPEND_FILE ~Divine_Remix/spheres/lw_major.2da~ APPEND_FILE ~Divine_Remix/spheres/pr_major.2da~ APPEND_FILE ~Divine_Remix/spheres/wa_major.2da~ LAUNCH_PATCH_MACRO ~spell_remove_evil~ // removes evil-aligned spells LAUNCH_PATCH_MACRO ~shift_paladin_spells~ // shift paladin spells LAUNCH_PATCH_MACRO ~reindex_clab~ // re-index lines BUT_ONLY_IF_IT_CHANGES Seeker - spheres (animals, divination, healing, plants, sun, weather) ACTION_IF ((FILE_EXISTS_IN_GAME ~cdnegpp.spl~) AND (FILE_EXISTS ~Divine_Remix/lib/macro_reindex_clab.tph~)) THEN BEGIN INCLUDE ~Divine_Remix/lib/extra_regexp_vars.tph~ INCLUDE ~Divine_Remix/lib/macro_spell_remove_evil.tph~ INCLUDE ~Divine_Remix/lib/macro_shift_ranger_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_reindex_clab.tph~ COPY_EXISTING ~y#zealo.2da~ ~override~ APPEND_FILE ~Divine_Remix/spheres/an_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/di_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/he_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/pl_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/sn_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/we_minor.2da~ LAUNCH_PATCH_MACRO ~spell_remove_evil~ // removes evil-aligned spells LAUNCH_PATCH_MACRO ~shift_ranger_spells~ // shift paladin spells LAUNCH_PATCH_MACRO ~reindex_clab~ // re-index lines BUT_ONLY_IF_IT_CHANGES And if my kit haven't got any spellcasting abilities, I still must making that weird things? Link to comment
CamDawg Posted October 2, 2006 Author Share Posted October 2, 2006 Sorry, I've been avoiding answering because I realized I need to revise the tutorial a bit. Because of some of the last minute changes in DR v4 (particularly w.r.t. alignment-based restrictions) some macroes were changed and a few added. The two big changes (and these both affect your code) are that the roles of the spell_remove_good and spell_remove_evil macroes have reversed and a new APPEND_FILE must be included for manually building spheres (lastline.2da). For the Zealot: ACTION_IF ((FILE_EXISTS_IN_GAME ~cdnegpp.spl~) AND (FILE_EXISTS ~Divine_Remix/lib/macro_reindex_clab.tph~)) THEN BEGIN INCLUDE ~Divine_Remix/lib/extra_regexp_vars.tph~ INCLUDE ~Divine_Remix/lib/macro_spell_remove_evil.tph~ INCLUDE ~Divine_Remix/lib/macro_shift_paladin_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_reindex_clab.tph~ COPY_EXISTING ~y#zealo.2da~ ~override~ APPEND_FILE ~Divine_Remix/spheres/co_major.2da~ APPEND_FILE ~Divine_Remix/spheres/di_major.2da~ APPEND_FILE ~Divine_Remix/spheres/lw_major.2da~ APPEND_FILE ~Divine_Remix/spheres/pr_major.2da~ APPEND_FILE ~Divine_Remix/spheres/wa_major.2da~ APPEND_FILE ~Divine_Remix/spheres/wa_major.2da~ APPEND_FILE ~Divine_Remix/spheres/lastline.2da~ LAUNCH_PATCH_MACRO ~spell_remove_good~ // removes spells inappropriate for good deities LAUNCH_PATCH_MACRO ~shift_paladin_spells~ // shift paladin spells LAUNCH_PATCH_MACRO ~reindex_clab~ // re-index lines BUT_ONLY_IF_IT_CHANGES END For the Seeker: ACTION_IF ((FILE_EXISTS_IN_GAME ~cdnegpp.spl~) AND (FILE_EXISTS ~Divine_Remix/lib/macro_reindex_clab.tph~)) THEN BEGIN INCLUDE ~Divine_Remix/lib/extra_regexp_vars.tph~ INCLUDE ~Divine_Remix/lib/macro_spell_remove_good.tph~ INCLUDE ~Divine_Remix/lib/macro_shift_ranger_spells.tph~ INCLUDE ~Divine_Remix/lib/macro_reindex_clab.tph~ COPY_EXISTING ~y#zealo.2da~ ~override~ APPEND_FILE ~Divine_Remix/spheres/an_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/di_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/he_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/pl_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/sn_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/we_minor.2da~ APPEND_FILE ~Divine_Remix/spheres/lastline.2da~ LAUNCH_PATCH_MACRO ~spell_remove_good~ // removes spells inappropriate for good deities LAUNCH_PATCH_MACRO ~shift_ranger_spells~ // shift paladin spells LAUNCH_PATCH_MACRO ~reindex_clab~ // re-index lines BUT_ONLY_IF_IT_CHANGES END Link to comment
Wounded_Lion Posted October 13, 2006 Share Posted October 13, 2006 'Bout damn time y'all put something like this up... LOL. Very interesting work, Cam. Complex but neat. - D Link to comment
CamDawg Posted October 13, 2006 Author Share Posted October 13, 2006 Updated them, finally. I also included a bit at the bottom of the first post for using the expanded druid alignments if DR is installed, though I haven't tested it. 'Bout damn time y'all put something like this up... LOL. Prior to v4 there wasn't a way to do this, save a lot of manual pain and suffering. Link to comment
Wounded_Lion Posted October 13, 2006 Share Posted October 13, 2006 Prior to v4 there wasn't a way to do this, save a lot of manual pain and suffering. My hat is off to you for making this possible, then. Excepting DR, G3 has always been good for interoperability and integration. Nice to see that 'the circle now is complete'. - D Link to comment
yarpen Posted October 14, 2006 Share Posted October 14, 2006 Hm... next thing. How to apply some "customised" spells - I want to make a kit, which healing spells heals 1DX +1/2 levels hit points. Hm... then I can add that spells via CLAB? For example GA_Y#WOH1 ? (where Y#WOH1.spl will be cure light wounds) Link to comment
Andyr Posted October 14, 2006 Share Posted October 14, 2006 Yarpen: yep. Wounded Lion: welcome back, it's been a while! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.