Fixed assorted typos in documents

Added an example ini to Ammo INI Loader mod.
Updated the changelog.
This commit is contained in:
NovaRain
2023-03-27 20:30:36 +08:00
parent b69e4e0eeb
commit 5b4e165368
12 changed files with 282 additions and 64 deletions
+201
View File
@@ -0,0 +1,201 @@
;Example Ammo INI for vanilla damage formula
; PID_EXPLOSIVE_ROCKET
[1]
pid=14
ac_adjust=0
dr_adjust=-25
dam_mult=1
dam_div=1
; PID_10MM_JHP
[2]
pid=29
ac_adjust=0
dr_adjust=25
dam_mult=2
dam_div=1
; PID_10MM_AP
[3]
pid=30
ac_adjust=0
dr_adjust=-25
dam_mult=1
dam_div=2
; PID_44_MAGNUM_JHP
[4]
pid=31
ac_adjust=0
dr_adjust=20
dam_mult=2
dam_div=1
; PID_FLAMETHROWER_FUEL
[5]
pid=32
ac_adjust=-20
dr_adjust=25
dam_mult=1
dam_div=1
; PID_14MM_AP
[6]
pid=33
ac_adjust=0
dr_adjust=-50
dam_mult=1
dam_div=2
; PID_223_FMJ
[7]
pid=34
ac_adjust=-20
dr_adjust=-20
dam_mult=1
dam_div=1
; PID_5MM_JHP
[8]
pid=35
ac_adjust=0
dr_adjust=35
dam_mult=2
dam_div=1
; PID_5MM_AP
[9]
pid=36
ac_adjust=0
dr_adjust=-35
dam_mult=1
dam_div=2
; PID_ROCKET_AP
[10]
pid=37
ac_adjust=-15
dr_adjust=-50
dam_mult=1
dam_div=1
; PID_SMALL_ENERGY_CELL
[11]
pid=38
ac_adjust=0
dr_adjust=0
dam_mult=1
dam_div=1
; PID_MICRO_FUSION_CELL
[12]
pid=39
ac_adjust=0
dr_adjust=0
dam_mult=1
dam_div=1
; PID_SHOTGUN_SHELLS
[13]
pid=95
ac_adjust=-10
dr_adjust=0
dam_mult=1
dam_div=1
; PID_44_FMJ_MAGNUM
[14]
pid=111
ac_adjust=0
dr_adjust=-20
dam_mult=1
dam_div=1
; PID_9MM_BALL
[15]
pid=121
ac_adjust=0
dr_adjust=0
dam_mult=1
dam_div=1
; PID_BBS
[16]
pid=163
ac_adjust=0
dr_adjust=0
dam_mult=1
dam_div=1
; PID_ROBO_ROCKET_AMMO
[17]
pid=274
ac_adjust=0
dr_adjust=-25
dam_mult=1
dam_div=1
; PID_45_CALIBER_AMMO
[18]
pid=357
ac_adjust=0
dr_adjust=0
dam_mult=1
dam_div=1
; PID_2MM_EC_AMMO
[19]
pid=358
ac_adjust=-30
dr_adjust=-20
dam_mult=3
dam_div=2
; PID_4_7MM_CASELESS
[20]
pid=359
ac_adjust=-5
dr_adjust=-10
dam_mult=3
dam_div=2
; PID_9MM_AMMO
[21]
pid=360
ac_adjust=0
dr_adjust=10
dam_mult=1
dam_div=2
; PID_HN_NEEDLER_CARTRIDGE
[22]
pid=361
ac_adjust=-10
dr_adjust=0
dam_mult=1
dam_div=1
; PID_HN_AP_NEEDLER_CARTRIDGE
[23]
pid=362
ac_adjust=-10
dr_adjust=0
dam_mult=2
dam_div=1
; PID_7_62MM_AMMO
[24]
pid=363
ac_adjust=-5
dr_adjust=-10
dam_mult=1
dam_div=1
; PID_FLAMETHROWER_FUEL_MK_II
[25]
pid=382
ac_adjust=-20
dr_adjust=0
dam_mult=1
dam_div=1
+2 -2
View File
@@ -352,7 +352,7 @@ special=60
;Each map has 2 variables
; r{index}=region # corrisponds to a region section above
; r{index}=region # corresponds to a region section above
; a{index]=type # set to 0 for no weather or 1 for normal weather
[Maps]
@@ -547,7 +547,7 @@ r70=16 ;cavern encounter 1
a70=0
r71=16 ;cavern encounter 2
a71=0
r72=16 ;cavern encoutner 3
r72=16 ;cavern encounter 3
a72=0
r73=16 ;cavern encounter 4
a73=0
+1 -1
View File
@@ -22,4 +22,4 @@ This folder contains documentation about sfall scripting extensions.
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.md**.
There are numerious new syntax features and extensions to SSL (Star-Trek Scripting Language).
There are numerous new syntax features and extensions to SSL (Star-Trek Scripting Language).
+1 -1
View File
@@ -22,4 +22,4 @@ This folder contains documentation about sfall scripting extensions.
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.html.
There are numerious new syntax features and extensions to SSL (Star-Trek Scripting Language).
There are numerous new syntax features and extensions to SSL (Star-Trek Scripting Language).
+1 -1
View File
@@ -200,7 +200,7 @@ _*mixed means any type_
- if array was "saved", it will be removed from a savegame
#### `mixed scan_array(int arrayID, mixed value)`
- searches for a first occurence of given value inside given array
- searches for a first occurrence of given value inside given array
- 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)
+4 -4
View File
@@ -1,7 +1,7 @@
Optimization
------------
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.
The execution 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
@@ -26,7 +26,7 @@ The sfall build of sslc supports a `-O` command line option to perform an optimi
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.
- constant propagation: checks for values assigned to variables which can be computed at compile time, and replaces relevant 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);
@@ -103,8 +103,8 @@ The sfall build of sslc supports a `-O` command line option to perform an optimi
-> end
```
- Mark functions with `pure` or `inline` where relevent.
- Mark functions with `pure` or `inline` where relevant.
* `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.
* `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 separate 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.
+6 -6
View File
@@ -99,7 +99,7 @@ Syntax which requires sfall for compiled scripts to be interpreted is marked by
x := 5;
```
- Multiple variable declaration: Multiple variables can be declared on one line, seperated by commas. This is an alterative to the ugly begin/end block, or the bulky single variable per line style.
- Multiple variable declaration: Multiple variables can be declared on one line, separated by commas. This is an alternative to the ugly begin/end block, or the bulky single variable per line style.
- new:
```
variable a, b, c;
@@ -131,7 +131,7 @@ Syntax which requires sfall for compiled scripts to be interpreted is marked by
a := 4096;
```
- Increment/decrement operators: `++` and `--` can be used as shorthand for `+= 1` and `-= 1` respectively. They are mearly a syntactic shorthand to improve readability, and so their use is only allowed where `+= 1` would normally be allowed.
- Increment/decrement operators: `++` and `--` can be used as shorthand for `+= 1` and `-= 1` respectively. They are merely a syntactic shorthand to improve readability, and so their use is only allowed where `+= 1` would normally be allowed.
- new:
```
a++;
@@ -222,7 +222,7 @@ Syntax which requires sfall for compiled scripts to be interpreted is marked by
- Empty statements in blocks are allowed: This is just a convenience to save scripters a bit of memory. Some of the macros in the Fallout headers include their own semicolons while others do not. With the original compiler you had to remember which was which, and if you got it wrong the script would not compile. Now it's always safe to include your own semicolon, even if the macro already had its own. For example, this would not compile with the original sslc, but will with the sfall edition:
```
#define my_macro diplay_msg("foo");
#define my_macro display_msg("foo");
procedure start begin
my_macro;
@@ -230,7 +230,7 @@ Syntax which requires sfall for compiled scripts to be interpreted is marked by
```
__NOTE:__ **Does not work currently.**
- Procedure stringify operator `@`: Designed to make callback-procedures a better option and allow for basic functional programming. Basically it replaces procedure names preceeded by `@` by a string constant.
- Procedure stringify operator `@`: Designed to make callback-procedures a better option and allow for basic functional programming. Basically it replaces procedure names preceded by `@` by a string constant.
- old:
```
callbackVar := "Node000";
@@ -397,7 +397,7 @@ There are several changes in this version of sslc which may result in problems f
**sfall 3.6:**
- added Python-style ternary operator (conditional expression)
- added `-s` short-circuit evalution option for `AND`, `OR` expressions
- added `-s` short-circuit evaluation option for `AND`, `OR` expressions
- **int2ssl** will detect and decompile conditional expressions and short-circuit logical operators
- added `-F` option to include full file paths in `#line` directives after preprocessing
- added `-D` option to write abstract syntax tree into `.txt` file
@@ -408,7 +408,7 @@ There are several changes in this version of sslc which may result in problems f
- implemented stringify procedure names using `@` operator, which is helpful to pass procedures around to call them from variables (it will properly handle references)
- logic for procedures passed as arguments to script functions was moved from code generation to parsing stage
- now it is possible to call user-defined procedures inside argument list of script functions, without compiler attempting to treat them as procedure references and probably fail (procedures will still be passed, but only to appropriate script functions at appropriate argument positions)
- **int2ssl** will now place empty parantheses after a call to user-defined procedure - this will distinct calls from passing procedures to some script functions (like `giq_option`)
- **int2ssl** will now place empty parentheses after a call to user-defined procedure - this will distinct calls from passing procedures to some script functions (like `giq_option`)
- fixed `inline` procedure "calls" not working when optimization is enabled
- added column numbers to error/warning output
- added code to simplify adding sfall opcodes into compiler (need to add code in 3 places, instead of 7 places for each opcode)