Skip to content

Commit

Permalink
Release 4.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
NovaRain committed Jan 20, 2022
2 parents 281823e + 0807a4e commit 41b4b77
Show file tree
Hide file tree
Showing 142 changed files with 9,263 additions and 987 deletions.
8 changes: 8 additions & 0 deletions DebugEditor/DebugEditor.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions DebugEditor/DebugEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ internal DebugEditor(EditorConnection connection) {
sr.Close();
}
Redraw();
redrawTimer.Start();
}

private void DebugEditor_FormClosing(object sender, FormClosingEventArgs e) {
Expand Down Expand Up @@ -188,6 +189,7 @@ private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs
default:
return;
}
redrawTimer.Stop();
if (e.ColumnIndex == 2) {
string str = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
int val;
Expand All @@ -211,11 +213,13 @@ private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs
connection.WriteInt(converter.GetAsInt(val));
}
}
redrawTimer.Start();
}

private void bEdit_Click(object sender, EventArgs e) {
if (dataGridView1.SelectedRows.Count == 0) return;
int i = (int)dataGridView1.SelectedRows[0].Tag;
redrawTimer.Stop();
switch (mode) {
case Mode.Arrays: {
DataType[] types = new DataType[connection.ArrayLengths[i]];
Expand Down Expand Up @@ -333,6 +337,7 @@ private void bEdit_Click(object sender, EventArgs e) {
}
break;
}
redrawTimer.Start();
}

private void bCrittersLvar_Click(object sender, EventArgs e) {
Expand Down Expand Up @@ -381,5 +386,9 @@ private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventA
private void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e) {
dataGridView1.Rows[e.RowIndex].Tag = e.RowIndex;
}

private void timer1_Tick(object sender, EventArgs e) {
connection.WriteDataType(DataTypeSend.RedrawGame);
}
}
}
3 changes: 3 additions & 0 deletions DebugEditor/DebugEditor.resx
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,7 @@
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="redrawTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
4 changes: 4 additions & 0 deletions DebugEditor/EditorWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ private EditorWindow(string[] names, DataType[] types, string[] values, bool isM
}

public static string[] ShowEditor(DebugEditor form, string[] names, DataType[] types, string[] values, bool isMap = false) {
form.redrawTimer.Start();
EditorWindow editor = new EditorWindow(names, types, values, isMap);
editor.ShowDialog();
form.redrawTimer.Stop();
if (editor.save) {
if (valueInHex) editor.ConvertValues(false);
return editor.values;
Expand All @@ -70,8 +72,10 @@ private EditorWindow(string[] values) {
}

public static string[] ShowEditor(DebugEditor form, string[] lvalues) {
form.redrawTimer.Start();
EditorWindow editor = new EditorWindow(lvalues);
editor.ShowDialog();
form.redrawTimer.Stop();
if (editor.save) {
if (valueInHex) editor.ConvertValues(false);
return editor.values;
Expand Down
3 changes: 2 additions & 1 deletion DebugEditor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ enum DataTypeSend {
SetArray = 10,
GetLocal = 11,
SetLocal = 12,
Exit = 254
Exit = 254,
RedrawGame = 255
}
}
6 changes: 3 additions & 3 deletions DebugEditor/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("sfall")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyCopyright("Copyright (C) 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -29,5 +29,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("4.1.9.0")]
[assembly: AssemblyFileVersion("4.1.9.0")]
[assembly: AssemblyVersion("4.1.9.1")]
[assembly: AssemblyFileVersion("4.1.9.1")]
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ runs:
#
git clone --quiet https://github.com/NovaRain/DXSDK_Collection.git "$DXSDK_DIR"
cp "$DXSDK_DIR/DXSDK_Aug2007/Lib/x86/dinput.lib" "$DXSDK_DIR/DXSDK_Jun2010/Lib/x86/"
cp "$DXSDK_DIR/DXSDK_Feb2010/Lib/x86/ddraw.lib" "$DXSDK_DIR/DXSDK_Jun2010/Lib/x86/"
#
echo "::endgroup::"
fi
Expand Down
2 changes: 2 additions & 0 deletions artifacts/config_files/Translations.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ PartyOrderAttackHuman=I'll take care of it.|Okay, I got it.|Sounds like a plan.
PartyOrderAttackCreature=::Growl::
PartyOrderAttackRobot=::Beep::

HiResInfo=This version of sfall has its own integrated High Resolution Patch mode, which is compatible with the settings of the High Resolution Patch by Mash.\n\nIf you want to continue using the Hi-Res Patch by Mash without seeing this message, disable the 'HiResMode' option in ddraw.ini.\nOr you can disable the external Hi-Res Patch to get new graphics improvements from sfall.\n\nDo you want to disable the High Resolution Patch by Mash?

[AppearanceMod]
RaceText=Race
StyleText=Style
Expand Down
37 changes: 18 additions & 19 deletions artifacts/ddraw.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
;sfall configuration settings
;v4.3.2
;v4.3.3

[Main]
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
;Set to 1 to enable the built-in High Resolution Patch mode that is similar to the hi-res patch by Mash
;The required settings will be read from the f2_res.ini configuration file of the original hi-res patch
HiResMode=1

;Set to 1 if you want to use command line arguments to tell sfall to use another ini file
;This option is always enabled in 4.3.3/3.8.33 or later. The information is left for reference only
UseCommandLine=0

;Uncomment and point to a file to get alternate translations for some sfall messages
Expand All @@ -13,7 +18,7 @@ UseCommandLine=0
[ExtraPatches]
;This section allows you to set multiple paths to folders containing mods or patches that will be loaded by the game
;If DataLoadOrderPatch is enabled, the data load order is:
;master_patches > critter_patches > PatchFile99..PatchFile0 > patchXXX.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
;master_patches > critter_patches > [extra patches] > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
;Paths to folders and Fallout .dat files are supported
;The PatchFile## options are available from 0 to 99. Larger numbers take precedence over smaller numbers (same as patchXXX.dat)
;PatchFile0=mods\RP_data
Expand Down Expand Up @@ -107,7 +112,7 @@ ActionPointsBar=0
;Set to 2 to skip correcting the position of entrance markers on town maps
;You can use resized FRMs in 700x682 for town maps in the expanded world map interface
;Requires High Resolution Patch v4.1.8 and a new WORLDMAP.frm file in art\intrface\ (included in sfall.dat)
;The resolution of hi-res patch must be set to at least 890x720
;The resolution of the hi-res patch must be set to at least 890x720
ExpandWorldMap=0

;Set to 1 to draw a dotted line while traveling on the world map (similar to Fallout 1)
Expand Down Expand Up @@ -184,7 +189,7 @@ BackgroundMouse=0
SpeedModKey=-1

;A key to press to toggle the speed tweak on or off
;Specify 0 if you don't want a toggle key, or a DX scancode otherwise
;Set to 0 if you don't want a toggle key, or a DX scancode otherwise
SpeedToggleKey=0

;The keys corresponding to the 10 speed slots
Expand Down Expand Up @@ -254,8 +259,8 @@ WorldMapEncounterFix=0
WorldMapEncounterRate=5

;The number of slots available in the locations list panel of the world map
;Set to 0 to leave unchanged. 17 is default.
;Setting this greater than 17 requires a replacement background FRM, or you'll get glitched graphics
;Set to 0 to leave the default unchanged (i.e. 17). The maximum is 127
;Setting this greater than 17 requires a replacement WMTABS.frm file in art\intrface\, or you'll get glitched graphics
WorldMapSlots=0

;To start a new game somewhere other than artemple.map, uncomment the next line and set it to the map you want to load
Expand All @@ -279,7 +284,7 @@ UseFileSystemOverride=0
;Original: patchXXX.dat > critter_patches > critter_dat > f2_res_patches > f2_res_dat > master_patches > master_dat
;Modified: master_patches > critter_patches > patchXXX.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
;This option is always enabled in 4.3/3.8.30 or later. The information is left for reference only
;DataLoadOrderPatch=1
DataLoadOrderPatch=1

;Set to 1 to load alternative dialog msg files from text\<language>\dialog_female\ for female PC
;Set to 2 to also load subtitle files from text\<language>\cuts_female\ for female PC
Expand Down Expand Up @@ -461,9 +466,6 @@ Doctor=293
Science=293
Repair=293

;Set to 1 to remove window position rounding for script-created windows
RemoveWindowRounding=1

;Set to 1 to add scroll buttons to the pipboy quest list, and remove the quests per area limit
;Set to 2 to use a different set of scroll buttons
UseScrollingQuestsList=1
Expand Down Expand Up @@ -617,10 +619,6 @@ ExplosionsEmitLight=0
;MovieTimer_artimer3=270
;MovieTimer_artimer4=360

;Set to 1 to enable the new arrays behavior (default behavior)
;Set to 0 for backward compatibility with pre-3.4 scripts
ArraysBehavior=1

;Set to 1 to add proper check for ammo before attacking and proper calculation of the number of burst rounds
;By default, weapons can make attacks when at least one ammo is left, regardless of ammo cost calculations
;Note that enabling this option will prevent super cattle prods and mega power fists from attacking with only one ammo left
Expand Down Expand Up @@ -847,11 +845,8 @@ AllowUnsafeScripting=0
;Does not require sfall debugging mode
;ExtraCRC=0x00000000,0x00000000

;Set to 1 to skip the executable file size check
;Set to 1 to skip the compatibility mode check
;Does not require sfall debugging mode
SkipSizeCheck=0

;Change to 1 to skip the compatibility mode check
SkipCompatModeCheck=0

;Fallout 2 Debug Patch
Expand All @@ -874,6 +869,10 @@ DebugMode=0
;Set to 1 to hide error messages in debug output when a null value is passed to the function as an object
HideObjIsNullMsg=0

;A key to press to toggle the display of the hex grid on the map on or off
;Set to 0 to disable, or a DX scancode otherwise
MapGridToggleKey=0

;Set to 1 to stop Fallout from deleting non read-only protos at startup
;Has pretty nasty side effects when saving/reloading, so don't use for regular gameplay
DontDeleteProtos=0
Expand Down
16 changes: 9 additions & 7 deletions artifacts/scripting/arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Both array types have their pros and cons and are suited for different tasks.
___
### ARRAYS SYNTAX

Basically arrays are implemented using number of new operators (scripting functions). But for ease of use, there are some new syntax elements:
Basically arrays are implemented using number of new operators (script functions). But for ease of use, there are some new syntax elements:

* Accessing elements. Use square brackets:
```js
Expand All @@ -67,8 +67,8 @@ Basically arrays are implemented using number of new operators (scripting functi
// create map:
{5: "Five", "health": 50, "speed": 0.252}
```
__NOTES:__
Make sure to call `fix_array` if you want new array to be available in the next frame or `save_array` if you want to use it for a longer period (see next section for details).
__NOTE:__
Make sure to call `fix_array` if you want the new array to be available in the next frame or `save_array` if you want to use it for a longer period (see next section for details).

* Iterating in loop. Use `foreach` key word like this:
```js
Expand All @@ -82,7 +82,7 @@ Basically arrays are implemented using number of new operators (scripting functi
end
```

See **sslc_readme.txt** file for full information on new SSL syntax features.
See **sslc_readme.md** file for full information on new SSL syntax features.

___
### STORING ARRAYS
Expand All @@ -94,7 +94,7 @@ There a 3 types of arrays:
Arrays of this type are auto-deleted at the end of the frame. So, for example, if you have a global script which runs at regular intervals, where you create a temporary array, it will not be available next time your global script is executed.

* **Permanent**. They are created using `create_array` function or `fix_array` (from pre-existing temporary array).
This type of arrays are always available (by their ID) until you start a new game or load a saved game (at which point they are deleted).
This type of arrays are always available (by their IDs) until you start a new game or load a saved game (at which point they are deleted).

* **Saved**. If you want your array to really stay for a while, use function `save_array` to make any array "saved". However, they are, like permanent arrays, "deleted" from memory when loading game. In order to use them properly, you must load them from the savegame using `load_array` whenever you want to use them.

Expand Down Expand Up @@ -236,9 +236,11 @@ ___

For those who used arrays in their mods before sfall 3.4:

* There is an INI parameter **arraysBehavior** in **Misc** section of ddraw.ini. If set to 0, all scripts which used sfall arrays before should work. This basically changes that `create_array` will create permanent arrays which are "saved" by default and their ID is also permanent. It is 1 by default.
* There is an INI parameter **ArraysBehavior** in **Misc** section of ddraw.ini. If set to 0, all scripts which used sfall arrays before should work. This basically changes that `create_array` will create permanent arrays which are "saved" by default and their IDs are also permanent. It is 1 by default.

* __NOTE:__ Starting from sfall 4.3.3/3.8.33, the **ArraysBehavior** option is removed, and arrays always work in **ArraysBehavior=1** mode. Make sure to review your scripts if you need to save arrays into savegames.

* How savegame compatibility is handled?\
Saved arrays are stored in **sfallgv.sav** file (in savegame) in new (more flexible) format, just after the old arrays. So basically, when you load older savegame, sfall will load arrays from old format and save them to new format on next game save. If you load savegame made with sfall 3.4 using sfall 3.3 (for example), game shouldn't crash, but all arrays will be lost.
Saved arrays are stored in **sfallgv.sav** file (in savegame) in new (more flexible) format, just after the old arrays. So basically, when you load older savegame, sfall will load arrays from old format and save them to new format on next game save. If you load savegame made with sfall 3.4 using sfall 3.3 (for example), the game shouldn't crash, but all arrays will be lost.

* Previously you had to specify size in bytes for array elements. This parameter is now ignored and you can store strings of arbitrary length in arrays.
Loading

0 comments on commit 41b4b77

Please sign in to comment.