mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e24e616d5c | ||
|
|
08d2ffe26d | ||
|
|
225fa9cc57 | ||
|
|
511d594e7d | ||
|
|
0e0d884a97 | ||
|
|
2950140e3a | ||
|
|
e70005dbd5 | ||
|
|
5ac91aec79 | ||
|
|
2578963f7d | ||
|
|
ce82348a15 | ||
|
|
74f3036b57 | ||
|
|
7666b4e08f | ||
|
|
b10fb8c162 | ||
|
|
e3628232c5 | ||
|
|
205602d85d | ||
|
|
89f454e825 | ||
|
|
977eae4c24 | ||
|
|
3cb013dfa3 | ||
|
|
c0bee95aa4 | ||
|
|
8ce87a3088 | ||
|
|
5aadf41668 | ||
|
|
7d71917f7a | ||
|
|
9454ad75a3 | ||
|
|
4c7cfb11b6 | ||
|
|
4460325f70 | ||
|
|
c427604d8d | ||
|
|
e7e6175084 | ||
|
|
73e1faae92 | ||
|
|
bdb95c80ec | ||
|
|
a9a5627b83 | ||
|
|
e566db91bb | ||
|
|
8d6e6874ee | ||
|
|
7cc25efb01 | ||
|
|
b1323fc07a | ||
|
|
5fcf4aae50 | ||
|
|
42afaa46ed | ||
|
|
8b858b6cb9 | ||
|
|
e8c952d082 | ||
|
|
024e8b1777 | ||
|
|
6b14d4f86e | ||
|
|
6e10f624a3 | ||
|
|
bc380b978d | ||
|
|
d2b3529ed0 | ||
|
|
f77cd85f95 | ||
|
|
39c5ab3674 | ||
|
|
7d75023b81 | ||
|
|
bd629b5460 | ||
|
|
5b180286d1 | ||
|
|
814c280432 | ||
|
|
c5f52105ec | ||
|
|
18cc3f7aa9 | ||
|
|
fda97ffefb | ||
|
|
00508adfb1 | ||
|
|
e906be67ab | ||
|
|
abe2430495 | ||
|
|
de51b6838b | ||
|
|
52126bf62d | ||
|
|
be7c1210a0 | ||
|
|
08a96bc27e | ||
|
|
f94085be93 | ||
|
|
89a49b4f32 | ||
|
|
cf5952c031 | ||
|
|
ac058ee4d7 | ||
|
|
b31f29a324 | ||
|
|
750d88ea9a | ||
|
|
68389d9474 | ||
|
|
97f3d3eb5f | ||
|
|
b187c8359b | ||
|
|
93f6131592 | ||
|
|
5a9edb9723 | ||
|
|
d14e7ccd9f | ||
|
|
c5baecfdad | ||
|
|
c1dc31a919 | ||
|
|
8e3e49b281 | ||
|
|
44411309f8 | ||
|
|
a35a4e034b | ||
|
|
21c85b298b | ||
|
|
5151ea312a | ||
|
|
def3e52302 | ||
|
|
06f35e10fb | ||
|
|
588abd2a4b | ||
|
|
c6813bdd74 | ||
|
|
53c0517268 | ||
|
|
81f112063e |
@@ -0,0 +1 @@
|
|||||||
|
*.ssl linguist-language=Pascal
|
||||||
@@ -46,6 +46,8 @@ nb-configuration.xml
|
|||||||
*.user
|
*.user
|
||||||
*.userosscache
|
*.userosscache
|
||||||
*.sln.docstates
|
*.sln.docstates
|
||||||
|
*.VC.db
|
||||||
|
*.VC.opendb
|
||||||
|
|
||||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
*.userprefs
|
*.userprefs
|
||||||
|
|||||||
Generated
+8
@@ -23,6 +23,7 @@
|
|||||||
/// the contents of this method with the code editor.
|
/// the contents of this method with the code editor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent() {
|
private void InitializeComponent() {
|
||||||
|
this.components = new System.ComponentModel.Container();
|
||||||
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||||
this.Column0 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.Column0 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
@@ -34,6 +35,7 @@
|
|||||||
this.bSGlobals = new System.Windows.Forms.Button();
|
this.bSGlobals = new System.Windows.Forms.Button();
|
||||||
this.bArrays = new System.Windows.Forms.Button();
|
this.bArrays = new System.Windows.Forms.Button();
|
||||||
this.bEdit = new System.Windows.Forms.Button();
|
this.bEdit = new System.Windows.Forms.Button();
|
||||||
|
this.redrawTimer = new System.Windows.Forms.Timer(this.components);
|
||||||
this.bCrittersLvar = new System.Windows.Forms.Button();
|
this.bCrittersLvar = new System.Windows.Forms.Button();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
@@ -154,6 +156,11 @@
|
|||||||
this.bEdit.UseVisualStyleBackColor = true;
|
this.bEdit.UseVisualStyleBackColor = true;
|
||||||
this.bEdit.Click += new System.EventHandler(this.bEdit_Click);
|
this.bEdit.Click += new System.EventHandler(this.bEdit_Click);
|
||||||
//
|
//
|
||||||
|
// redrawTimer
|
||||||
|
//
|
||||||
|
this.redrawTimer.Interval = 200;
|
||||||
|
this.redrawTimer.Tick += new System.EventHandler(this.timer1_Tick);
|
||||||
|
//
|
||||||
// bCrittersLvar
|
// bCrittersLvar
|
||||||
//
|
//
|
||||||
this.bCrittersLvar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.bCrittersLvar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
@@ -202,6 +209,7 @@
|
|||||||
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
|
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
|
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
|
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
|
||||||
|
internal System.Windows.Forms.Timer redrawTimer;
|
||||||
private System.Windows.Forms.Button bCrittersLvar;
|
private System.Windows.Forms.Button bCrittersLvar;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ namespace FalloutClient {
|
|||||||
sr.Close();
|
sr.Close();
|
||||||
}
|
}
|
||||||
Redraw();
|
Redraw();
|
||||||
|
redrawTimer.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DebugEditor_FormClosing(object sender, FormClosingEventArgs e) {
|
private void DebugEditor_FormClosing(object sender, FormClosingEventArgs e) {
|
||||||
@@ -188,6 +189,7 @@ namespace FalloutClient {
|
|||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
redrawTimer.Stop();
|
||||||
if (e.ColumnIndex == 2) {
|
if (e.ColumnIndex == 2) {
|
||||||
string str = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
|
string str = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
|
||||||
int val;
|
int val;
|
||||||
@@ -211,11 +213,13 @@ namespace FalloutClient {
|
|||||||
connection.WriteInt(converter.GetAsInt(val));
|
connection.WriteInt(converter.GetAsInt(val));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
redrawTimer.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void bEdit_Click(object sender, EventArgs e) {
|
private void bEdit_Click(object sender, EventArgs e) {
|
||||||
if (dataGridView1.SelectedRows.Count == 0) return;
|
if (dataGridView1.SelectedRows.Count == 0) return;
|
||||||
int i = (int)dataGridView1.SelectedRows[0].Tag;
|
int i = (int)dataGridView1.SelectedRows[0].Tag;
|
||||||
|
redrawTimer.Stop();
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case Mode.Arrays: {
|
case Mode.Arrays: {
|
||||||
DataType[] types = new DataType[connection.ArrayLengths[i]];
|
DataType[] types = new DataType[connection.ArrayLengths[i]];
|
||||||
@@ -333,6 +337,7 @@ namespace FalloutClient {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
redrawTimer.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void bCrittersLvar_Click(object sender, EventArgs e) {
|
private void bCrittersLvar_Click(object sender, EventArgs e) {
|
||||||
@@ -381,5 +386,9 @@ namespace FalloutClient {
|
|||||||
private void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e) {
|
private void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e) {
|
||||||
dataGridView1.Rows[e.RowIndex].Tag = e.RowIndex;
|
dataGridView1.Rows[e.RowIndex].Tag = e.RowIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void timer1_Tick(object sender, EventArgs e) {
|
||||||
|
connection.WriteDataType(DataTypeSend.RedrawGame);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,4 +129,7 @@
|
|||||||
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</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>
|
</root>
|
||||||
@@ -48,8 +48,10 @@ namespace FalloutClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static string[] ShowEditor(DebugEditor form, string[] names, DataType[] types, string[] values, bool isMap = false) {
|
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);
|
EditorWindow editor = new EditorWindow(names, types, values, isMap);
|
||||||
editor.ShowDialog();
|
editor.ShowDialog();
|
||||||
|
form.redrawTimer.Stop();
|
||||||
if (editor.save) {
|
if (editor.save) {
|
||||||
if (valueInHex) editor.ConvertValues(false);
|
if (valueInHex) editor.ConvertValues(false);
|
||||||
return editor.values;
|
return editor.values;
|
||||||
@@ -70,8 +72,10 @@ namespace FalloutClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static string[] ShowEditor(DebugEditor form, string[] lvalues) {
|
public static string[] ShowEditor(DebugEditor form, string[] lvalues) {
|
||||||
|
form.redrawTimer.Start();
|
||||||
EditorWindow editor = new EditorWindow(lvalues);
|
EditorWindow editor = new EditorWindow(lvalues);
|
||||||
editor.ShowDialog();
|
editor.ShowDialog();
|
||||||
|
form.redrawTimer.Stop();
|
||||||
if (editor.save) {
|
if (editor.save) {
|
||||||
if (valueInHex) editor.ConvertValues(false);
|
if (valueInHex) editor.ConvertValues(false);
|
||||||
return editor.values;
|
return editor.values;
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ namespace FalloutClient {
|
|||||||
SetArray = 10,
|
SetArray = 10,
|
||||||
GetLocal = 11,
|
GetLocal = 11,
|
||||||
SetLocal = 12,
|
SetLocal = 12,
|
||||||
Exit = 254
|
Exit = 254,
|
||||||
|
RedrawGame = 255
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("sfall")]
|
[assembly: AssemblyProduct("sfall")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
[assembly: AssemblyCopyright("Copyright (C) 2022")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("4.1.9.0")]
|
[assembly: AssemblyVersion("4.1.9.1")]
|
||||||
[assembly: AssemblyFileVersion("4.1.9.0")]
|
[assembly: AssemblyFileVersion("4.1.9.1")]
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
# sfall
|
# sfall
|
||||||
|
|
||||||
A set of engine modifications for the classic game Fallout 2 in form of a DLL, which modifies executable in memory without changing anything in EXE file itself.
|
[](https://www.gnu.org/licenses/gpl-3.0)
|
||||||
|
|
||||||
|
A set of engine modifications for the classic game Fallout 2 in the form of a DLL, which modifies executable in memory without changing anything in EXE file itself.
|
||||||
|
|
||||||
**Engine modifications include:**
|
**Engine modifications include:**
|
||||||
- Better support for modern operating systems
|
- Better support for modern operating systems
|
||||||
@@ -10,7 +12,11 @@ A set of engine modifications for the classic game Fallout 2 in form of a DLL, w
|
|||||||
- Extended scripting capabilities for modders (many new opcodes to control sfall features as well as previously unavailable vanilla engine functions)
|
- Extended scripting capabilities for modders (many new opcodes to control sfall features as well as previously unavailable vanilla engine functions)
|
||||||
|
|
||||||
|
|
||||||
Original author: timeslip
|
Original author: **Timeslip**
|
||||||
|
|
||||||
Original description: A set of engine modifications for the classic game Fallout 2 by Interplay. Includes fixes for bugs in the original engine, allows fallout to run correctly on modern operating systems, and adds additional features for modders.
|
Original description: A set of engine modifications for the classic game Fallout 2 by Interplay. Includes fixes for bugs in the original engine, allows fallout to run correctly on modern operating systems, and adds additional features for modders.
|
||||||
|
|
||||||
|
---
|
||||||
|
#### Fallout Engine IDA Database
|
||||||
|
[Download for IDA Pro 6.8](https://www.dropbox.com/s/tm0nyx0lnk4yui0/Fallout_1_and_2_IDA68.rar?dl=1 "Download from Dropbox")
|
||||||
|
| [Download for IDA Pro 7.0](https://www.dropbox.com/s/61srq09pn8grfpu/Fallout_1_and_2_IDA70.rar?dl=1 "Download from Dropbox") (comments are in Russian)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
;This file handles modifications to perks and traits
|
;This file handles modifications to perks and traits
|
||||||
|
|
||||||
;When adding extra perks to a mod, it's advisable to use the fake perk scripting functions rather than make modifications
|
;When adding extra perks to a mod, it's advisable to use the fake perk scripting functions rather than make
|
||||||
; in this file, as some perks have hardcoded effects which may catch you out
|
; modifications in this file, as some perks have hardcoded effects which may catch you out
|
||||||
|
|
||||||
;Since traits need to be picked before any scripts run, they have an additional NoHardcode option in this file which can
|
;Since traits need to be picked before any scripts run, they have an additional NoHardcode option in this file which can
|
||||||
; be used to remove their hardcoded effects, and add new stat/skill effects
|
; be used to remove their hardcoded effects, and add new stat/skill effects
|
||||||
@@ -64,20 +64,25 @@ Enable=0
|
|||||||
;Image: The line number (0-indexed) of the corresponding FRM in skilldex.lst
|
;Image: The line number (0-indexed) of the corresponding FRM in skilldex.lst
|
||||||
;Ranks: The number of perk levels
|
;Ranks: The number of perk levels
|
||||||
;Level: The minimum required level
|
;Level: The minimum required level
|
||||||
;Type: If 0, the perk checks only Skill1 for skill requirements; if 1, it checks Skill1 or Skill2; if 2, it checks both Skill1 and Skill2
|
;Type: If 0, the perk checks only Skill1 for skill requirements; if 1, it checks Skill1 or Skill2; if 2, it checks both
|
||||||
|
; Skill1 and Skill2
|
||||||
;Stat: The modified stat or -1 if you don't want to change any stats
|
;Stat: The modified stat or -1 if you don't want to change any stats
|
||||||
;StatMag: The increased/decreased value to the modified stat
|
;StatMag: The increased/decreased value to the modified stat
|
||||||
|
|
||||||
;Skill1/Skill2: The first/second skill (or -1 for none) to check, but if you set a specific bit 0x4000000 (67108864), it checks GVAR.
|
;Skill1/Skill2: The first/second skill (or -1 for none) to check, but if you set a specific bit 0x4000000 (67108864),
|
||||||
; For example, if Skill1=0x4000004, then the perk will check GVAR_BAD_MONSTER (0x4000000 + 4) on Skill1Mag value
|
; it checks the corresponding GVAR
|
||||||
|
; For example, if Skill1=0x4000004, the perk will check GVAR_BAD_MONSTER (0x4000000 + 4) on Skill1Mag value
|
||||||
|
|
||||||
;Skill1Mag/Skill2Mag: Positive value is used as the minimum requirements of the first/second skill/GVAR, and a negative value is interpreted as the maximum requirement.
|
;Skill1Mag/Skill2Mag: Positive value is used as the minimum requirements of the first/second skill/GVAR, and a negative
|
||||||
; For example, with Skill1=0 and Skill1Mag=100, if player has small guns skill >= 100 and meets all other requirements, the perk will be available in the
|
; value is interpreted as the maximum requirement
|
||||||
; selection window; with Skill1=1 and Skill1Mag=-120, the perk will not be available if player has big guns skill >= 120
|
; For example, with Skill1=0 and Skill1Mag=100, if player has small guns skill >= 100 and meets all other requirements,
|
||||||
|
; the perk will be available in the selection window; with Skill1=1 and Skill1Mag=-120, the perk will not be available
|
||||||
|
; if player has big guns skill >= 120
|
||||||
|
|
||||||
;STR-LCK: Positive values are used as minimum requirements of SPECIAL stats, and negative values are interpreted as maximum requirements.
|
;STR-LCK: Positive values are used as minimum requirements of SPECIAL stats, and negative values are interpreted as
|
||||||
; For some special perks processed by the engine (e.g. PERK_armor_powered and PERK_armor_combat), the values are not used as requirements
|
; maximum requirements
|
||||||
; but to add to corresponding SPECIAL stats
|
; For some special perks processed by the engine (e.g. PERK_armor_powered and PERK_armor_combat), the values are not
|
||||||
|
; used as requirements but to add to corresponding SPECIAL stats
|
||||||
|
|
||||||
;If the value is set to -99999, the variable will be ignored (similar to comment out that line)
|
;If the value is set to -99999, the variable will be ignored (similar to comment out that line)
|
||||||
|
|
||||||
|
|||||||
@@ -32,4 +32,4 @@ DoneBtn=Done
|
|||||||
;PowerKick=Power Kick:
|
;PowerKick=Power Kick:
|
||||||
;HipKick=Hip Kick:
|
;HipKick=Hip Kick:
|
||||||
;HookKick=Hook Kick:
|
;HookKick=Hook Kick:
|
||||||
;PiercingKick=Piercing kick:
|
;PiercingKick=Piercing Kick:
|
||||||
|
|||||||
+32
-39
@@ -1,8 +1,9 @@
|
|||||||
;sfall configuration settings
|
;sfall configuration settings
|
||||||
;v3.8.32
|
;v3.8.36
|
||||||
|
|
||||||
[Main]
|
[Main]
|
||||||
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
|
;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
|
UseCommandLine=0
|
||||||
|
|
||||||
;Uncomment and point to a file to get alternate translations for some sfall messages
|
;Uncomment and point to a file to get alternate translations for some sfall messages
|
||||||
@@ -37,6 +38,7 @@ SpeedMultiInitial=100
|
|||||||
;Set to 6 for DX9 fullscreen windowed (the resolution in f2_res.ini should be set to the same aspect ratio as your desktop resolution)
|
;Set to 6 for DX9 fullscreen windowed (the resolution in f2_res.ini should be set to the same aspect ratio as your desktop resolution)
|
||||||
;A DX9 mode is required for any graphics related script extender functions to work (i.e. fullscreen shaders)
|
;A DX9 mode is required for any graphics related script extender functions to work (i.e. fullscreen shaders)
|
||||||
;Modes 1, 2 and 3 are no longer supported
|
;Modes 1, 2 and 3 are no longer supported
|
||||||
|
;If using the hi-res patch by Mash, this option will always be read from the main ddraw.ini file
|
||||||
Mode=0
|
Mode=0
|
||||||
|
|
||||||
;If using a DX9 mode, this changes the resolution
|
;If using a DX9 mode, this changes the resolution
|
||||||
@@ -75,6 +77,7 @@ Use32BitHeadGraphics=0
|
|||||||
;Set to 1 to automatically search for alternative AVI video files when Fallout tries to play the game movies
|
;Set to 1 to automatically search for alternative AVI video files when Fallout tries to play the game movies
|
||||||
;Set to 2 to force AVI videos to fit the screen width
|
;Set to 2 to force AVI videos to fit the screen width
|
||||||
;Requires DX9 graphics mode
|
;Requires DX9 graphics mode
|
||||||
|
;The recommended video codec is Xvid
|
||||||
AllowDShowMovies=0
|
AllowDShowMovies=0
|
||||||
|
|
||||||
;Fade effect time percentage modifier
|
;Fade effect time percentage modifier
|
||||||
@@ -101,9 +104,6 @@ WorldMapTerrainInfo=0
|
|||||||
;Set to 0 to leave the default unchanged (i.e. 4). The maximum is 32
|
;Set to 0 to leave the default unchanged (i.e. 4). The maximum is 32
|
||||||
NumSoundBuffers=0
|
NumSoundBuffers=0
|
||||||
|
|
||||||
;Set to 1 to enable fade effects for background music when stopping and starting the playback
|
|
||||||
FadeBackgroundMusic=1
|
|
||||||
|
|
||||||
;Set to 1 to allow attaching sound files to combat float messages
|
;Set to 1 to allow attaching sound files to combat float messages
|
||||||
AllowSoundForFloats=0
|
AllowSoundForFloats=0
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ BackgroundMouse=0
|
|||||||
SpeedModKey=-1
|
SpeedModKey=-1
|
||||||
|
|
||||||
;A key to press to toggle the speed tweak on or off
|
;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
|
SpeedToggleKey=0
|
||||||
|
|
||||||
;The keys corresponding to the 10 speed slots
|
;The keys corresponding to the 10 speed slots
|
||||||
@@ -183,10 +183,10 @@ WindowScrollKey=0
|
|||||||
ToggleItemHighlightsKey=42
|
ToggleItemHighlightsKey=42
|
||||||
|
|
||||||
;Set to 1 to also highlight containers
|
;Set to 1 to also highlight containers
|
||||||
HighlightContainers=1
|
HighlightContainers=0
|
||||||
|
|
||||||
;Set to 1 to also highlight lootable corpses
|
;Set to 1 to also highlight lootable corpses
|
||||||
HighlightCorpses=1
|
HighlightCorpses=0
|
||||||
|
|
||||||
;Set the color of outlines, available colors:
|
;Set the color of outlines, available colors:
|
||||||
;1 - glowing red
|
;1 - glowing red
|
||||||
@@ -248,8 +248,8 @@ WorldMapEncounterFix=0
|
|||||||
WorldMapEncounterRate=5
|
WorldMapEncounterRate=5
|
||||||
|
|
||||||
;The number of slots available in the locations list panel of the world map
|
;The number of slots available in the locations list panel of the world map
|
||||||
;Set to 0 to leave unchanged. 17 is default.
|
;Set to 0 to leave the default unchanged (i.e. 17). The maximum is 127
|
||||||
;Setting this greater than 17 requires a replacement background FRM, or you'll get glitched graphics
|
;Setting this greater than 17 requires a replacement WMTABS.frm file in art\intrface\, or you'll get glitched graphics
|
||||||
WorldMapSlots=0
|
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
|
;To start a new game somewhere other than artemple.map, uncomment the next line and set it to the map you want to load
|
||||||
@@ -273,7 +273,7 @@ UseFileSystemOverride=0
|
|||||||
;Original: patchXXX.dat > critter_patches > critter_dat > f2_res_patches > f2_res_dat > master_patches > master_dat
|
;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
|
;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
|
;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 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
|
;Set to 2 to also load subtitle files from text\<language>\cuts_female\ for female PC
|
||||||
@@ -320,7 +320,7 @@ Movie17=credits.mve
|
|||||||
|
|
||||||
;To change the limit of the distance away from the player to which you're allowed to scroll the local maps, uncomment the next two lines
|
;To change the limit of the distance away from the player to which you're allowed to scroll the local maps, uncomment the next two lines
|
||||||
;Defaults are 480 in the x direction and 400 in the y direction.
|
;Defaults are 480 in the x direction and 400 in the y direction.
|
||||||
;Not compatible with the res patch!
|
;Does not work with the hi-res patch by Mash!
|
||||||
;LocalMapXLimit=480
|
;LocalMapXLimit=480
|
||||||
;LocalMapYLimit=400
|
;LocalMapYLimit=400
|
||||||
|
|
||||||
@@ -455,9 +455,6 @@ Doctor=293
|
|||||||
Science=293
|
Science=293
|
||||||
Repair=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 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
|
;Set to 2 to use a different set of scroll buttons
|
||||||
UseScrollingQuestsList=1
|
UseScrollingQuestsList=1
|
||||||
@@ -528,8 +525,11 @@ AnimationsAtOnceLimit=120
|
|||||||
;Set to 1 to remove the limits that stop the player rolling critical successes/misses in the first few days of game time
|
;Set to 1 to remove the limits that stop the player rolling critical successes/misses in the first few days of game time
|
||||||
RemoveCriticalTimelimits=0
|
RemoveCriticalTimelimits=0
|
||||||
|
|
||||||
;Change the colour of the font used on the main menu for the Fallout/sfall version number and copyright text
|
;Change the colour of the font used on the main menu for the Fallout/sfall version string and copyright text
|
||||||
;It's the last byte ('3C' by default) that picks the colour used. The first byte supplies additional flags for this option
|
;It's the last byte ('3C' by default) that picks the colour used. The first byte supplies additional flags for this option
|
||||||
|
;1 - change the colour for the version string only
|
||||||
|
;2 - underline text for the version string
|
||||||
|
;4 - use monospace font for the version string
|
||||||
;MainMenuFontColour=0x00003C
|
;MainMenuFontColour=0x00003C
|
||||||
;Change the colour of the font used on the main menu for the button text
|
;Change the colour of the font used on the main menu for the button text
|
||||||
;MainMenuBigFontColour=0x3C
|
;MainMenuBigFontColour=0x3C
|
||||||
@@ -583,15 +583,12 @@ SuperStimExploitFix=0
|
|||||||
InventoryApCost=4
|
InventoryApCost=4
|
||||||
QuickPocketsApCostReduction=2
|
QuickPocketsApCostReduction=2
|
||||||
|
|
||||||
;Set to 1 to enable the balanced bullet distribution formula for burst attacks
|
;These options modify the bullet distribution of burst attacks
|
||||||
ComputeSprayMod=0
|
;All the bullets are divided into three groups: center, left, and right
|
||||||
|
;These groups will then travel along three parallel tracks, trying to hit targets on the way
|
||||||
;These options modify the bullet distribution of burst attacks if ComputeSprayMod is 1
|
;CenterMult/Div set the ratio of how many bullets go to the center group, and the remaining are divided equally to the left and right sides
|
||||||
;All the bullets are divided into three groups: central, left and right
|
;TargetMult/Div set the ratio of how many bullets in the center group will attack the primary target directly
|
||||||
;These three groups will then travel along three parallel tracks, trying to hit targets on the way
|
;Multiplier values are capped at divisor values
|
||||||
;CenterMult/Div set the ratio of how many bullets go to the central group, and remaining bullets are divided equally to left and right sides
|
|
||||||
;TargetMult/Div set the ratio of how many bullets in the central group will attack the primary target directly
|
|
||||||
;Multipliers are capped at divisor values
|
|
||||||
ComputeSpray_CenterMult=1
|
ComputeSpray_CenterMult=1
|
||||||
ComputeSpray_CenterDiv=3
|
ComputeSpray_CenterDiv=3
|
||||||
ComputeSpray_TargetMult=1
|
ComputeSpray_TargetMult=1
|
||||||
@@ -612,10 +609,6 @@ ExplosionsEmitLight=0
|
|||||||
;MovieTimer_artimer3=270
|
;MovieTimer_artimer3=270
|
||||||
;MovieTimer_artimer4=360
|
;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
|
;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
|
;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
|
;Note that enabling this option will prevent super cattle prods and mega power fists from attacking with only one ammo left
|
||||||
@@ -630,7 +623,7 @@ PipboyTimeAnimDelay=50
|
|||||||
|
|
||||||
;Allows you to directly control other critters in combat
|
;Allows you to directly control other critters in combat
|
||||||
;Set to 0 to disable
|
;Set to 0 to disable
|
||||||
;Set to 1 to control all critters in combat
|
;Set to 1 to control all critters in combat (allowed only in sfall debugging mode)
|
||||||
;Set to 2 to control all party members
|
;Set to 2 to control all party members
|
||||||
ControlCombat=0
|
ControlCombat=0
|
||||||
;If you want to control only specific critters, uncomment the ControlCombatPIDList line and set a comma delimited list of PIDs
|
;If you want to control only specific critters, uncomment the ControlCombatPIDList line and set a comma delimited list of PIDs
|
||||||
@@ -748,10 +741,6 @@ CreateObjectSidFix=0
|
|||||||
;Note that enabling this option will cause problems for existing grave scripts
|
;Note that enabling this option will cause problems for existing grave scripts
|
||||||
GraveContainersFix=0
|
GraveContainersFix=0
|
||||||
|
|
||||||
;Set to 1 to fix the issue with the division operator treating negative integers as unsigned
|
|
||||||
;Note: To perform the unsigned integer division, use the new 'div' operator
|
|
||||||
DivisionOperatorFix=1
|
|
||||||
|
|
||||||
;Set to 1 to fix the priority score calculation for choosing the best weapon for NPCs
|
;Set to 1 to fix the priority score calculation for choosing the best weapon for NPCs
|
||||||
;Note that enabling this option can affect the weapon of choice for some NPCs
|
;Note that enabling this option can affect the weapon of choice for some NPCs
|
||||||
AIBestWeaponFix=1
|
AIBestWeaponFix=1
|
||||||
@@ -811,7 +800,7 @@ DisableSpecialAreas=0
|
|||||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||||
[Debugging]
|
[Debugging]
|
||||||
;Extra sfall configuration settings that can be used by modders
|
;Extra sfall configuration settings that can be used by modders
|
||||||
;This section is not effected by the 'UseCommandLine' option. It will always be read from the main ini
|
;This section is not affected by the 'UseCommandLine' option. It will always be read from the main ddraw.ini file
|
||||||
|
|
||||||
;Set to 1 to enable sfall debugging mode
|
;Set to 1 to enable sfall debugging mode
|
||||||
Enable=0
|
Enable=0
|
||||||
@@ -826,11 +815,8 @@ AllowUnsafeScripting=0
|
|||||||
;Does not require sfall debugging mode
|
;Does not require sfall debugging mode
|
||||||
;ExtraCRC=0x00000000,0x00000000
|
;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
|
;Does not require sfall debugging mode
|
||||||
SkipSizeCheck=0
|
|
||||||
|
|
||||||
;Change to 1 to skip the compatibility mode check
|
|
||||||
SkipCompatModeCheck=0
|
SkipCompatModeCheck=0
|
||||||
|
|
||||||
;Fallout 2 Debug Patch
|
;Fallout 2 Debug Patch
|
||||||
@@ -853,10 +839,17 @@ DebugMode=0
|
|||||||
;Set to 1 to hide error messages in debug output when a null value is passed to the function as an object
|
;Set to 1 to hide error messages in debug output when a null value is passed to the function as an object
|
||||||
HideObjIsNullMsg=0
|
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
|
;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
|
;Has pretty nasty side effects when saving/reloading, so don't use for regular gameplay
|
||||||
DontDeleteProtos=0
|
DontDeleteProtos=0
|
||||||
|
|
||||||
|
;Set to 1 to force sfall to inject all hooks code into the game, even if corresponding hook scripts don't exist
|
||||||
|
InjectAllGameHooks=0
|
||||||
|
|
||||||
;Set to 1 to force sfall to search for global/hook scripts every time the game loads rather than only the first time
|
;Set to 1 to force sfall to search for global/hook scripts every time the game loads rather than only the first time
|
||||||
AlwaysFindScripts=0
|
AlwaysFindScripts=0
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -1,14 +1,14 @@
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
Ammo INI Loader mod for Fallout 2 by NovaRain
|
Ammo INI Loader mod v1.1 for Fallout 2 by NovaRain
|
||||||
---------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
||||||
- modifies ammo protos with data from an INI file:
|
- modifies ammo protos with data from an INI file:
|
||||||
* AmmoGlovz.ini if DamageFormula=1 or 2 in ddraw.ini
|
* AmmoGlovz.ini if DamageFormula=1 or 2 in ddraw.ini
|
||||||
* AmmoYAAM.ini if DamageFormula=5 in ddraw.ini
|
* AmmoYAAM.ini if DamageFormula=5 in ddraw.ini
|
||||||
* AmmoMod.ini if not using any bulit-in damage formula
|
* AmmoMod.ini if not using any bulit-in damage formula
|
||||||
|
|
||||||
Requires sfall 3.5 or higher
|
Requires sfall 4.0/3.8.29 or higher
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ variable ammoData;
|
|||||||
variable enabled;
|
variable enabled;
|
||||||
|
|
||||||
procedure start begin
|
procedure start begin
|
||||||
variable i := 1, ammo, ammoPid, dmgMod;
|
variable i := 1, ammo, ammoSection, dmgMod;
|
||||||
if game_loaded then begin
|
if game_loaded then begin
|
||||||
enabled := get_ini_setting("ddraw.ini|Misc|DamageFormula");
|
enabled := get_ini_setting("ddraw.ini|Misc|DamageFormula");
|
||||||
if (enabled == 1 or enabled == 2) then
|
if (enabled == 1 or enabled == 2) then
|
||||||
@@ -37,19 +37,19 @@ procedure start begin
|
|||||||
if (enabled <= 0) then return;
|
if (enabled <= 0) then return;
|
||||||
|
|
||||||
ammoData := create_array_map;
|
ammoData := create_array_map;
|
||||||
ammoPid := enabled; // pid from the first section
|
ammoSection := get_ini_section(ammoIni, "" + i);
|
||||||
while (ammoPid > 0) do begin
|
while (ammoSection.pid > 0) do begin
|
||||||
ammo := create_array_map; // create permanent arrays
|
ammo := create_array_map; // create permanent arrays
|
||||||
ammo.ac_adjust := get_ini_setting(ammoIni + "|" + i + "|ac_adjust");
|
ammo.ac_adjust := atoi(ammoSection.ac_adjust);
|
||||||
ammo.dr_adjust := get_ini_setting(ammoIni + "|" + i + "|dr_adjust");
|
ammo.dr_adjust := atoi(ammoSection.dr_adjust);
|
||||||
// dam_mult and dam_div must be positive integers
|
// dam_mult and dam_div must be positive integers
|
||||||
dmgMod := get_ini_setting(ammoIni + "|" + i + "|dam_mult");
|
dmgMod := atoi(ammoSection.dam_mult);
|
||||||
ammo.dam_mult := dmgMod if (dmgMod > 0) else 1;
|
ammo.dam_mult := dmgMod if (dmgMod > 0) else 1;
|
||||||
dmgMod := get_ini_setting(ammoIni + "|" + i + "|dam_div");
|
dmgMod := atoi(ammoSection.dam_div);
|
||||||
ammo.dam_div := dmgMod if (dmgMod > 0) else 1;
|
ammo.dam_div := dmgMod if (dmgMod > 0) else 1;
|
||||||
ammoData[ammoPid] := ammo;
|
ammoData[atoi(ammoSection.pid)] := ammo;
|
||||||
i++;
|
i++;
|
||||||
ammoPid := get_ini_setting(ammoIni + "|" + i + "|pid");
|
ammoSection := get_ini_section(ammoIni, "" + i);
|
||||||
end
|
end
|
||||||
call map_enter_p_proc;
|
call map_enter_p_proc;
|
||||||
debug_msg("Ammo INI Loader mod: " + ammoIni + " - set " + (i - 1) + " ammo protos.");
|
debug_msg("Ammo INI Loader mod: " + ammoIni + " - set " + (i - 1) + " ammo protos.");
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Ammo INI Loader mod for Fallout 2 by NovaRain
|
Ammo INI Loader mod v1.1 for Fallout 2 by NovaRain
|
||||||
---------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
||||||
- modifies ammo protos with data from an INI file:
|
- modifies ammo protos with data from an INI file:
|
||||||
* AmmoGlovz.ini if DamageFormula=1 or 2 in ddraw.ini
|
* AmmoGlovz.ini if DamageFormula=1 or 2 in ddraw.ini
|
||||||
@@ -7,6 +7,6 @@ Ammo INI Loader mod for Fallout 2 by NovaRain
|
|||||||
* AmmoMod.ini if not using any bulit-in damage formula
|
* AmmoMod.ini if not using any bulit-in damage formula
|
||||||
|
|
||||||
|
|
||||||
Requires sfall 3.5 or higher.
|
Requires sfall 4.0/3.8.29 or higher.
|
||||||
|
|
||||||
To use, copy gl_ammomod.int to your scripts folder, and copy the INI files to the same directory as sfall.
|
To use, copy gl_ammomod.int to your scripts folder, and copy the INI files to the same directory as sfall.
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
Key=42
|
Key=42
|
||||||
|
|
||||||
; Set to 1 to also highlight containers
|
; Set to 1 to also highlight containers
|
||||||
Containers=1
|
Containers=0
|
||||||
|
|
||||||
; Set to 1 to also highlight lootable corpses
|
; Set to 1 to also highlight lootable corpses
|
||||||
Corpses=1
|
Corpses=0
|
||||||
|
|
||||||
; Set to 1 to only highlight objects in the player's line-of-sight
|
; Set to 1 to only highlight objects in the player's line-of-sight
|
||||||
CheckLOS=0
|
CheckLOS=0
|
||||||
|
|||||||
@@ -21,5 +21,5 @@ This folder contains documentation about sfall scripting extensions.
|
|||||||
hookscripts.md - detailed manual for using hook scripts to modify engine behavior
|
hookscripts.md - detailed manual for using hook scripts to modify engine behavior
|
||||||
arrays.md - manual for sfall arrays
|
arrays.md - manual for sfall arrays
|
||||||
|
|
||||||
If you are/will be using sfall Script Editor, don't forget to check out new compiler documentation in **.\compiler\sslc_readme.txt**.
|
If you are/will be using sfall Script Editor, don't forget to check out new compiler documentation in **.\compiler\sslc_readme.md**.
|
||||||
There are numerious new syntax features and extensions to SSL (Star-Trek Scripting language).
|
There are numerious new syntax features and extensions to SSL (Star-Trek Scripting Language).
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ This folder contains documentation about sfall scripting extensions.
|
|||||||
lib.strings.h - search in strings, join, repeat, etc.
|
lib.strings.h - search in strings, join, repeat, etc.
|
||||||
lib.misc.h - misc stuff
|
lib.misc.h - misc stuff
|
||||||
|
|
||||||
sfall function notes.txt - incomplete reference for new opcodes
|
sfall function notes.html - incomplete reference for new opcodes
|
||||||
sfall opcode list.txt - list of all sfall opcodes (w/o descriptions)
|
sfall opcode list.txt - list of all sfall opcodes (w/o descriptions)
|
||||||
hookscripts.txt - detailed manual for using hook scripts to modify engine behavior
|
hookscripts.html - detailed manual for using hook scripts to modify engine behavior
|
||||||
arrays.txt - manual for sfall arrays
|
arrays.html - manual for sfall arrays
|
||||||
|
|
||||||
If you are/will be using sfall Script Editor, don't forget to check out new compiler documentation in .\compiler\sslc_readme.txt.
|
If you are/will be using sfall Script Editor, don't forget to check out new compiler documentation in .\compiler\sslc_readme.html.
|
||||||
There are numerious new syntax features and extensions to SSL (Star-Trek Scripting language).
|
There are numerious new syntax features and extensions to SSL (Star-Trek Scripting Language).
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ Both array types have their pros and cons and are suited for different tasks.
|
|||||||
___
|
___
|
||||||
### ARRAYS SYNTAX
|
### 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:
|
* Accessing elements. Use square brackets:
|
||||||
```js
|
```js
|
||||||
@@ -67,8 +67,8 @@ Basically arrays are implemented using number of new operators (scripting functi
|
|||||||
// create map:
|
// create map:
|
||||||
{5: "Five", "health": 50, "speed": 0.252}
|
{5: "Five", "health": 50, "speed": 0.252}
|
||||||
```
|
```
|
||||||
__NOTES:__
|
__NOTE:__
|
||||||
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).
|
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:
|
* Iterating in loop. Use `foreach` key word like this:
|
||||||
```js
|
```js
|
||||||
@@ -82,7 +82,7 @@ Basically arrays are implemented using number of new operators (scripting functi
|
|||||||
end
|
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
|
### STORING ARRAYS
|
||||||
@@ -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.
|
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).
|
* **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.
|
* **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.
|
||||||
|
|
||||||
@@ -201,7 +201,7 @@ _*mixed means any type_
|
|||||||
|
|
||||||
#### `mixed scan_array(int arrayID, mixed value)`
|
#### `mixed scan_array(int arrayID, mixed value)`
|
||||||
- searches for a first occurence of given value inside given array
|
- searches for a first occurence of given value inside given array
|
||||||
- if value is found, returns it's index (for lists) or key (for maps)
|
- if value is found, returns its index (for lists) or key (for maps)
|
||||||
- if value is not found, returns -1 (be careful, as -1 can be a valid key for a map)
|
- if value is not found, returns -1 (be careful, as -1 can be a valid key for a map)
|
||||||
|
|
||||||
#### `int len_array(int arrayID)`
|
#### `int len_array(int arrayID)`
|
||||||
@@ -236,9 +236,11 @@ ___
|
|||||||
|
|
||||||
For those who used arrays in their mods before sfall 3.4:
|
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?\
|
* 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.
|
* 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.
|
||||||
|
|||||||
@@ -1,99 +0,0 @@
|
|||||||
The executation speed of scripts is not typically important in an unmodded game, given the difference in performance between a modern computer and what Fallout was designed for. When you start adding mods to the mix there's the potential for problems again, since sfall's global script system means that you can have a large amount of scripts being run every single frame.
|
|
||||||
|
|
||||||
======================
|
|
||||||
=== sslc -O option ===
|
|
||||||
======================
|
|
||||||
|
|
||||||
The sfall build of sslc supports a -O command line option to perform an optimization pass over the generated code. This isn't a magic make-my-code-go-faster bullet; most of what it does is very limited in scope. It's primary purpose was to strip out the procedures and variables which get automatically pulled into every script that includes define.h, whether you use them or not, and to do something about the additional variables that get created by foreach loops.
|
|
||||||
|
|
||||||
There are several levels of optimization available:
|
|
||||||
-O1 - Basic, only removes unreferenced globals variables and procedures, code itself remains untouched.
|
|
||||||
-O2 - Full, most code optimizations are on, but only those that were tested on complex scripts.
|
|
||||||
-O3 - Experimental, provides most efficiency, but tend to break some complex code due to bugs.
|
|
||||||
|
|
||||||
The following optimizations are performed:
|
|
||||||
|
|
||||||
> constant expression folding: if an expression depends only on values which are known at compile time, then the expression is replaced by its result.
|
|
||||||
|
|
||||||
a:=2+2; -> a:=4;
|
|
||||||
|
|
||||||
> constant variable initialization: All variables are initialised to some value, ('0', if you don't specify anything else,) so sslc attempts to make use of that fact to remove the first assignment to a variable if the first assignment is a constant expression.
|
|
||||||
|
|
||||||
variable a; -> variable a:=4;
|
|
||||||
a:=4; ->
|
|
||||||
|
|
||||||
> constant propagation: checks for values assigned to variables which can be computed at compile time, and replaces relevent references to the symbol by the constant. The original store is not removed by this optimization. Global variables are considered for this optimization only if they are not marked import or export, and are not assigned to anywhere in the script.
|
|
||||||
|
|
||||||
a:=4 -> a:=4
|
|
||||||
foo(a); -> foo(4);
|
|
||||||
|
|
||||||
> dead code removal: Checks for and removes code which cannot be reached, either because it is hidden behind a return or because the argument to an if statement can be computed at compile time.
|
|
||||||
|
|
||||||
if 1 then begin -> display_msg("foo");
|
|
||||||
display_msg("foo"); ->
|
|
||||||
end else begin ->
|
|
||||||
display_msg("bar"); ->
|
|
||||||
end ->
|
|
||||||
|
|
||||||
> unreferenced variable elimination: Checks for variables which are never referenced, and removes them. Also applies to global variables, as long as they are not marked for export.
|
|
||||||
|
|
||||||
variable i, j, k; -> variable i;
|
|
||||||
i:=1; -> i:=1;
|
|
||||||
return; -> return;
|
|
||||||
|
|
||||||
> unreferenced procedure elimination: Checks for any procedures which are never called, and removes them.
|
|
||||||
|
|
||||||
procedure foo begin return "foo"; end -> procedure foo begin return "foo"; end
|
|
||||||
procedure bar begin return "bar"; end -> procedure start begin
|
|
||||||
procedure start begin -> display_msg(foo);
|
|
||||||
display_msg(foo); -> end
|
|
||||||
end ->
|
|
||||||
|
|
||||||
> dead store removal: Removes variable assignments if the result of the variable is unused, and if the expression used to compute the value of the variable is provably free of side effects. (See 'pure' keyword)
|
|
||||||
|
|
||||||
a:="moo"; -> a:="foo";
|
|
||||||
a:="foo"; -> display_msg(a);
|
|
||||||
display_msg(a); ->
|
|
||||||
a:="bar"; ->
|
|
||||||
|
|
||||||
> store combination: Where there are two stores in a row to the same variable, the two expressions are combined.
|
|
||||||
|
|
||||||
var1 := var2; -> var1 := var2 + var3;
|
|
||||||
var1 += var3; ->
|
|
||||||
|
|
||||||
> variable combination: Where usage regions of variables do not overlap, combine the variables to provide additional candidates for unreferenced variable elimination. Very useful for scripts containing multiple foreach loops, which generate 2 or 3 hidden variables each.
|
|
||||||
|
|
||||||
a:="foo"; -> a:="foo";
|
|
||||||
display_msg(a); -> display_msg(a);
|
|
||||||
b:="bar"; -> a:="bar";
|
|
||||||
display_msg(b); -> display_msg(a);
|
|
||||||
|
|
||||||
> namelist compression: Fallout stores the names of all file scope variables and procedures in a namelist which is saved into the .int. Any of these that are unreferenced can be removed, and the names of global variables can be modified to make them shorter.
|
|
||||||
|
|
||||||
=============================
|
|
||||||
=== writing your own code ===
|
|
||||||
=============================
|
|
||||||
|
|
||||||
Don't have global scripts running any more often that you need them to. Not everything needs to be run every single frame.
|
|
||||||
|
|
||||||
Never concat constant strings with the '+' operator, as it forces the operation to be done at runtime. The compiler can cope with constant strings being placed next to each other without the need for a +, which results in far more efficient code as the combination is done at lex time.
|
|
||||||
|
|
||||||
#define GLOB_PREFIX "ts__" -> #define GLOB_PREFIX "ts__"
|
|
||||||
|
|
||||||
procedure start begin -> procedure start begin
|
|
||||||
set_sfall_global(GLOB_PREFIX + "foo1", 0); -> set_sfall_global(GLOB_PREFIX "foo1", 0);
|
|
||||||
end -> end
|
|
||||||
|
|
||||||
|
|
||||||
Avoid function calls in while loops. function calls are expensive in comparison to variable lookups, so it's more efficient to move the function call out of the loop and store the result in a variable
|
|
||||||
|
|
||||||
while i < len_array(array) do begin -> tmp:= len_array(array);
|
|
||||||
... -> while i < tmp do begin
|
|
||||||
end -> ...
|
|
||||||
-> end
|
|
||||||
|
|
||||||
Mark functions with pure or inline where relevent.
|
|
||||||
|
|
||||||
'pure' is a hint to the optimizer that a procedure has no side effects. (i.e. there's no way to tell that it's been called aside from its return value.) Pure procedures cannot modify global variables, or call any other procedure that isn't itself pure. Functions marked with pure can only be used in expressions (i.e. you cannot use the 'call <procedure>' syntax to call them.) If there are non-pure terms in an expression, it prevents that expression being considered for dead store removal. Where no such optimizations can be performed, or if optimization is disabled, marking a procedure with pure will have no effect on the compiled code.
|
|
||||||
|
|
||||||
'inline' is an instruction to the compiler to replace calls to the marked procedure with a copy of the procedures code instead of having a seperate call. inlined procedures cannot use the 'return' command, cannot be predefined, and cannot be used as part of an expression. inlining if a procedure is only going to be called once is always a win, but if there are multiple calls to a procedure you will end up bloating the size of the generated code.
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user