Skip to content

Commit

Permalink
Merge pull request #6 from mike1072/master
Browse files Browse the repository at this point in the history
Version 6
  • Loading branch information
mike1072 authored Aug 3, 2016
2 parents 0a45d22 + 98d97df commit 4b33d77
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package_mod.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ call "%~dp0..\ModPackaging\utilities\ie_games.bat"

REM /* MODIFY: set the values of the 3 variables below to reflect the current mod version */
set "mod_name=Wheels of Prophecy"
set mod_version=v5
set mod_version=v6
set mod_folder=wheels

REM /* MODIFY: list here which IE games the mod is compatible with, from this list of possibilities: */
Expand Down
12 changes: 9 additions & 3 deletions wheels/readme-wheels.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1>The Wheels of Prophecy</h1>
<div class="section">
<p><strong><a href="http://www.gibberlings3.net/">A Gibberlings Three Mod</a> <br />
Author: DavidW</strong></p>
<p><strong> Version 4</strong></p>
<p><strong> Version 6</strong></p>
</div>
<h2>Overview</h2>
<div class="section">
Expand Down Expand Up @@ -127,14 +127,20 @@ <h2>Version History</h2>
</ul>
<p>V4 (February 2016)</p>
<ul>
<li>Added French translation courtesy of Mornagest (of the d'Oghmatiques)
<li>Added French translation, courtesy of Mornagest (of the d'Oghmatiques)
<li>Included sox for improved OS X compatibility
</ul>
<p>V5 (May 2016)</p>
<ul>
<li>Added EET compatibility courtesy of K4thos
<li>Added EET compatibility, courtesy of K4thos
<li>Fixed invalid abilities offset in dw#melri.itm that would prevent other mods from patching the file successfully
</ul>
<p>V6 (August 2016)</p>
<ul>
<li>Updated EET compatibility, courtesy of K4thos
<li>Added fixes to handle file changes in EE v2
<li>Improved robustness when encountering missing files, courtesy of CrevsDaak
</ul>

</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion wheels/setup-wheels.tp2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BACKUP ~stratagems_external/backup/wheels~
AUTHOR ~For help troubleshooting installation problems, go to the Wheels of Prophecy forum at forums.gibberlings3.net.~
VERSION ~v5~
VERSION ~v6~
README ~wheels/readme-wheels.html~
AUTO_EVAL_STRINGS
AUTO_TRA ~wheels/tra/%s~
Expand Down
6 changes: 4 additions & 2 deletions wheels/sfo/general/lib_iterate.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,10 @@ BEGIN
COUNT_2DA_ROWS 2 rowcount
FOR (i=0;i<rowcount;i+=1) BEGIN
READ_2DA_ENTRY i 0 2 idscode
LPF idscode_to_spell INT_VAR idscode RET resref END
SPRINT list "%list% %resref%.spl"
PATCH_IF IS_AN_INT idscode BEGIN
LPF idscode_to_spell INT_VAR idscode RET resref END
SPRINT list "%list% %resref%.spl"
END
END
BUT_ONLY
COPY_EXISTING_REGEXP "\(clab\|lu\).*\.2da" "%workspace%"
Expand Down
47 changes: 29 additions & 18 deletions wheels/sfo/general/lib_macro.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,17 @@ DEFINE_ACTION_MACRO ~read_in_spellcodes~ BEGIN
LOCAL_SET level=0
LOCAL_SPRINT spelltype ""
ACTION_IF !VARIABLE_IS_SET ~macro_read_in_spellcodes~ BEGIN
OUTER_SPRINT ~macro_read_in_spellcodes~ ~~

OUTER_SPRINT ~macro_read_in_spellcodes~ ~~

ACTION_IF ENGINE_IS ~bgee bg2ee eet~ BEGIN
OUTER_SET ids_first_row = 1
END ELSE BEGIN
OUTER_SET ids_first_row = 0
END

COPY_EXISTING ~spell.ids~ ~override~
READ_2DA_ENTRIES_NOW ~spell_array~ 2
FOR (i=0;i<~spell_array~;i=i+1) BEGIN
FOR (i=ids_first_row;i<~spell_array~;i=i+1) BEGIN
READ_2DA_ENTRY_FORMER ~spell_array~ i 0 ~spellcode~
INNER_PATCH_SAVE ~spellcode~ ~%spellcode%~ BEGIN
READ_ASCII 0x1 ~level~ (1)
Expand Down Expand Up @@ -324,7 +330,7 @@ DEFINE_ACTION_MACRO ~read_in_clab_spelldata~ BEGIN
DELETE_BYTES 0x0 3
END
TO_UPPER resource
PATCH_IF !VARIABLE_IS_SET "RESREF_%resource%_LEVEL" BEGIN
PATCH_IF !VARIABLE_IS_SET "RESREF_%resource%_LEVEL" && FILE_EXISTS_IN_GAME "%resource%.spl" BEGIN
INNER_ACTION BEGIN
COPY_EXISTING "%resource%.spl" "%workspace%"
LPF SPL_read_level RET "RESREF_%resource%_LEVEL"=value END
Expand All @@ -338,9 +344,8 @@ DEFINE_ACTION_MACRO ~read_in_clab_spelldata~ BEGIN
DELETE_BYTES 0x0 3
END
TO_UPPER resource
PATCH_IF !VARIABLE_IS_SET "RESREF_%resource%_KIT_EFFECTS_ADD" BEGIN
PATCH_IF !VARIABLE_IS_SET "RESREF_%resource%_KIT_EFFECTS_ADD" && FILE_EXISTS_IN_GAME "%resource%.spl" BEGIN
INNER_ACTION BEGIN
ACTION_IF FILE_EXISTS_IN_GAME "%resource%.spl" BEGIN
COPY_EXISTING "%resource%.spl" "%workspace%"
SPRINT tempadd ""
SPRINT tempremove ""
Expand All @@ -358,9 +363,8 @@ DEFINE_ACTION_MACRO ~read_in_clab_spelldata~ BEGIN
SPRINT tempremove "%tempremove% delete_effect=>~opcode=%opcode% and parameter2=%parameter2% and resource=%resource_here%~" // parameter1 intentionally left out
END
BUT_ONLY
END
OUTER_SPRINT "RESREF_%resource%_KIT_EFFECTS_ADD" "%tempadd%"
OUTER_SPRINT "RESREF_%resource%_KIT_EFFECTS_REMOVE" "%tempremove%"
OUTER_SPRINT "RESREF_%resource%_KIT_EFFECTS_ADD" "%tempadd%"
OUTER_SPRINT "RESREF_%resource%_KIT_EFFECTS_REMOVE" "%tempremove%"
END
END
END
Expand Down Expand Up @@ -639,7 +643,7 @@ END
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

DEFINE_ACTION_MACRO read_in_proficiency_progression BEGIN
ACTION_IF !VARIABLE_IS_SET proficiency_progression_read_in BEGIN
ACTION_IF !VARIABLE_IS_SET proficiency_progression_read_in BEGIN
OUTER_SET proficiency_progression_read_in=1
COPY_EXISTING profs.2da ~%workspace%~
READ_2DA_ENTRIES_NOW MACRO_prof_progression_data 3
Expand All @@ -651,15 +655,22 @@ DEFINE_ACTION_MACRO read_in_proficiency_progression BEGIN
SET ~PROFICIENCY_RATE_%MACRO_class%~=MACRO_rate
END
BUT_ONLY

ACTION_IF ENGINE_IS ~bgee bg2ee eet~ BEGIN
OUTER_SET 2da_first_row = 1
END ELSE BEGIN
OUTER_SET 2da_first_row = 0
END

COPY_EXISTING profsmax.2da "%workspace%"
READ_2DA_ENTRIES_NOW MACRO_prof_max_data 3
FOR (i=0;i<MACRO_prof_max_data;i+=1) BEGIN
READ_2DA_ENTRY_FORMER MACRO_prof_max_data i 0 MACRO_class
READ_2DA_ENTRY_FORMER MACRO_prof_max_data i 1 MACRO_first_level
READ_2DA_ENTRY_FORMER MACRO_prof_max_data i 2 MACRO_other_level
SET "PROFICIENCY_FIRST_LEVEL_MAX_%MACRO_class%"=MACRO_first_level
SET "PROFICIENCY_OTHER_LEVEL_MAX_%MACRO_class%"=MACRO_other_level
END
READ_2DA_ENTRIES_NOW MACRO_prof_max_data 3
FOR (i=2da_first_row;i<MACRO_prof_max_data;i+=1) BEGIN
READ_2DA_ENTRY_FORMER MACRO_prof_max_data i 0 MACRO_class
READ_2DA_ENTRY_FORMER MACRO_prof_max_data i 1 MACRO_first_level
READ_2DA_ENTRY_FORMER MACRO_prof_max_data i 2 MACRO_other_level
SET "PROFICIENCY_FIRST_LEVEL_MAX_%MACRO_class%"=MACRO_first_level
SET "PROFICIENCY_OTHER_LEVEL_MAX_%MACRO_class%"=MACRO_other_level
END
BUT_ONLY
END
END
Expand Down

0 comments on commit 4b33d77

Please sign in to comment.