Skip to content

Commit

Permalink
update to fix bg2_chapter variable bug (1 of 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidMWWallace committed May 7, 2019
1 parent 39fd1d7 commit 16cd6f0
Showing 1 changed file with 65 additions and 69 deletions.
134 changes: 65 additions & 69 deletions wheels/setup-wheels.tp2
Original file line number Diff line number Diff line change
@@ -1,69 +1,65 @@
BACKUP ~weidu_external/backup/wheels~
SUPPORT ~http://gibberlings3.net/forums/index.php?showforum=156~
VERSION ~v8.1~
README ~wheels/readme-wheels.html~
AUTO_EVAL_STRINGS
AUTO_TRA ~wheels/tra/%s~



ALWAYS
ACTION_IF GAME_IS ~eet~ BEGIN
OUTER_SET bg2_chapter = 12
END ELSE BEGIN
OUTER_SET bg2_chapter = 0
END
OUTER_FOR (i=1; i<=10; i=i+1) BEGIN
OUTER_SET bg2_chapter = bg2_chapter + 1
OUTER_SPRINT name_source ~bg2_chapter_%i%~
OUTER_SET EVAL ~%name_source%~ = bg2_chapter
END

OUTER_SPRINT MOD_VERSION "v8"
OUTER_SPRINT scsroot "wheels"
OUTER_SET initialise=1

OUTER_SET debug_variable=0
INCLUDE ~%scsroot%/sfo/install_sfo.tpa~

// Convert charsets to utf-8 so that non-English EE games won't crash
LAF handle_charsets_immutably STR_VAR tra_base=tra RET scs_tra_loc END

LOAD_TRA "%scs_tra_loc%/english/setup.tra" "%scs_tra_loc%/%LANGUAGE%/setup.tra"

ACTION_FOR_EACH macro IN spellcodes saving_throws hit_point_levels stats PCs thac0 BEGIN
PRINT ~Reading in data: %macro%~
SILENT
LAUNCH_ACTION_MACRO ~read_in_%macro%~
END
OUTER_SPRINT ssllibrary "%scsroot%/ssl/library"
OUTER_SET debug_variable=0
OUTER_SET read_resources=1
APPEND state.ids "0x00000029 STATE_IMMOBILE" UNLESS " +STATE_IMMOBILE"
APPEND state.ids "0x8010202D STATE_DISABLED" UNLESS " +STATE_DISABLED"
END

////////////////////////////////////////////////////////////////////
//// Language commands
//////////////////////////////////////////////////////////////////////

LANGUAGE
"English"
"english"
~wheels/tra/english/setup.tra~

LANGUAGE
"Francais (Mornagest)"
"french"
~wheels/tra/english/setup.tra~
~wheels/tra/french/setup.tra~

///////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
BEGIN @1 // ~The Wheels of Prophecy~
///////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
REQUIRE_PREDICATE GAME_IS "tob bgt bg2ee eet" @2
FORBID_COMPONENT "setup-stratagems.tp2" 5900 @3
OUTER_SPRINT component_loc ""
LAF run STR_VAR file="wheels" location=lib END
BACKUP ~weidu_external/backup/wheels~
SUPPORT ~http://gibberlings3.net/forums/index.php?showforum=156~
VERSION ~v8.2~
README ~wheels/readme-wheels.html~
AUTO_EVAL_STRINGS
AUTO_TRA ~wheels/tra/%s~



ALWAYS


OUTER_SET chapter_increment = (GAME_IS eet)? 12 : 0
OUTER_FOR (i=1;i<=10;i+=1) BEGIN
OUTER_SET $bg2_chapter("%i%")=i+chapter_increment
END

OUTER_SPRINT MOD_VERSION "v8.2"
OUTER_SPRINT scsroot "wheels"
OUTER_SET initialise=1

OUTER_SET debug_variable=0
INCLUDE ~%scsroot%/sfo/install_sfo.tpa~

// Convert charsets to utf-8 so that non-English EE games won't crash
LAF handle_charsets_immutably STR_VAR tra_base=tra RET scs_tra_loc END

LOAD_TRA "%scs_tra_loc%/english/setup.tra" "%scs_tra_loc%/%LANGUAGE%/setup.tra"

ACTION_FOR_EACH macro IN spellcodes saving_throws hit_point_levels stats PCs thac0 BEGIN
PRINT ~Reading in data: %macro%~
SILENT
LAUNCH_ACTION_MACRO ~read_in_%macro%~
END
OUTER_SPRINT ssllibrary "%scsroot%/ssl/library"
OUTER_SET debug_variable=0
OUTER_SET read_resources=1
APPEND state.ids "0x00000029 STATE_IMMOBILE" UNLESS " +STATE_IMMOBILE"
APPEND state.ids "0x8010202D STATE_DISABLED" UNLESS " +STATE_DISABLED"
END

////////////////////////////////////////////////////////////////////
//// Language commands
//////////////////////////////////////////////////////////////////////

LANGUAGE
"English"
"english"
~wheels/tra/english/setup.tra~

LANGUAGE
"Francais (Mornagest)"
"french"
~wheels/tra/english/setup.tra~
~wheels/tra/french/setup.tra~

///////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
BEGIN @1 // ~The Wheels of Prophecy~
///////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
REQUIRE_PREDICATE GAME_IS "tob bgt bg2ee eet" @2
FORBID_COMPONENT "setup-stratagems.tp2" 5900 @3
OUTER_SPRINT component_loc ""
LAF run STR_VAR file="wheels" location=lib END

0 comments on commit 16cd6f0

Please sign in to comment.