Skip to content

Commit

Permalink
Fix indentation in codeblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
GeckoEidechse committed Sep 20, 2024
1 parent 8f9c10d commit d3e1a42
Show file tree
Hide file tree
Showing 50 changed files with 2,060 additions and 2,060 deletions.
166 changes: 83 additions & 83 deletions docs/Modding/guides/gettingstarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ Provided is a template `mod.json`, for a detailed list of values read the
`cheatsheet`

```json
{
"Name": "Yourname.Modname",
"Description": "Woo yeah wooo!",

"LoadPriority": 0,
"ConVars": [],
"Scripts": [],
"Localisation": []
}
{
"Name": "Yourname.Modname",
"Description": "Woo yeah wooo!",

"LoadPriority": 0,
"ConVars": [],
"Scripts": [],
"Localisation": []
}
```

Inside the `mod` folder, existing files found in the engine's virtual file system will
Expand All @@ -48,24 +48,24 @@ be overwritten and new files can be added. If you need to define new Squirrel fi
example for this might be:

```json
"Scripts": [
{
"Path": "path/to/file.nut",
"RunOn": "( CLIENT || SERVER ) && MP"
},
{
"Path": "path/to/another_file.nut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"Before": "ClientPreMapspawnThing",
"After": "AfterMapspawnClientThing"
},
"ServerCallback": {
"Before": "ServerPreMapspawncrap",
"After": "ServerAfterMapspawnWoo"
}
}
]
"Scripts": [
{
"Path": "path/to/file.nut",
"RunOn": "( CLIENT || SERVER ) && MP"
},
{
"Path": "path/to/another_file.nut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"Before": "ClientPreMapspawnThing",
"After": "AfterMapspawnClientThing"
},
"ServerCallback": {
"Before": "ServerPreMapspawncrap",
"After": "ServerAfterMapspawnWoo"
}
}
]
```

`"Path"` indicates where the script is, `"RunOn"` is the Squirrel VM context (see
Expand All @@ -85,35 +85,35 @@ This guide will dig into each of the possible `mod.json` fields. Please note tha
This is what a well-formatted `mod.json` looks like:

```json
{
"Name": "Northstar.CustomServers",
"Description": "Attempts to recreate the behaviour of vanilla Titanfall 2 servers, as well as changing some scripts to allow better support for mods",
"Version": "1.5.0",
"LoadPriority": 0,
"ConVars": [
{
"Name": "ns_private_match_last_mode",
"DefaultValue": "tdm"
},
{
"Name": "ns_private_match_last_map",
"DefaultValue": "mp_forwardbase_kodai"
}
],
"Scripts": [
{
"Path": "sh_northstar_utils.gnut",
"RunOn": "CLIENT || SERVER || UI"
},
{
"Path": "mp/_classic_mp_dropship_intro.gnut",
"RunOn": "SERVER && MP"
}
],
"Localisation": [
"resource/northstar_custom_%language%.txt"
]
}
{
"Name": "Northstar.CustomServers",
"Description": "Attempts to recreate the behaviour of vanilla Titanfall 2 servers, as well as changing some scripts to allow better support for mods",
"Version": "1.5.0",
"LoadPriority": 0,
"ConVars": [
{
"Name": "ns_private_match_last_mode",
"DefaultValue": "tdm"
},
{
"Name": "ns_private_match_last_map",
"DefaultValue": "mp_forwardbase_kodai"
}
],
"Scripts": [
{
"Path": "sh_northstar_utils.gnut",
"RunOn": "CLIENT || SERVER || UI"
},
{
"Path": "mp/_classic_mp_dropship_intro.gnut",
"RunOn": "SERVER && MP"
}
],
"Localisation": [
"resource/northstar_custom_%language%.txt"
]
}
```

!!! note
Expand Down Expand Up @@ -171,14 +171,14 @@ If I don't want to wait 15 seconds for matches to start on my server,
`ns_private_match_countdown_length` in its `mod.json` manifesto:

```json
"ConVars": [
{
"Name": "ns_private_match_countdown_length",
"DefaultValue": "15"
},
"ConVars": [
{
"Name": "ns_private_match_countdown_length",
"DefaultValue": "15"
},

...
]
...
]
```

I can setup the `ns_private_match_countdown_length` variable in my
Expand All @@ -189,8 +189,8 @@ When starting a match, `Northstar.CustomServers` mod will retrieve the configura
variable value, or its default value if it hasn't been specified in configuration file:

```squirrel
// start countdown
SetUIVar( level, "gameStartTime", Time() + GetConVarFloat( "ns_private_match_countdown_length" ) )
// start countdown
SetUIVar( level, "gameStartTime", Time() + GetConVarFloat( "ns_private_match_countdown_length" ) )
```

!!! note
Expand Down Expand Up @@ -247,24 +247,24 @@ The scripts field lets you declare an array of Squirrel files to import into you
Each script entry must have a "Path" value and a "RunOn" value.

```json
"Scripts": [
{
"Path": "path/to/file.nut",
"RunOn": "( CLIENT || SERVER ) && MP"
},
{
"Path": "path/to/another_file.nut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"Before": "ClientPreMapspawnThing",
"After": "AfterMapspawnClientThing"
},
"ServerCallback": {
"Before": "ServerPreMapspawncrap",
"After": "ServerAfterMapspawnWoo"
}
}
]
"Scripts": [
{
"Path": "path/to/file.nut",
"RunOn": "( CLIENT || SERVER ) && MP"
},
{
"Path": "path/to/another_file.nut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"Before": "ClientPreMapspawnThing",
"After": "AfterMapspawnClientThing"
},
"ServerCallback": {
"Before": "ServerPreMapspawncrap",
"After": "ServerAfterMapspawnWoo"
}
}
]
```

#### Path
Expand Down
78 changes: 39 additions & 39 deletions docs/Modding/guides/keyvalue/crosshairmodding.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ Example Mod:
```
WeaponData
{
RUI_CrosshairData
RUI_CrosshairData
{
Crosshair_1
{
Crosshair_1
{
"ui" "ui/crosshair_alternator"
}
"ui" "ui/crosshair_alternator"
}
}
}
```

3: change "ui/crosshair_alternator" to your desired crosshair
Expand All @@ -34,22 +34,22 @@ Weapons].txt
into one**

```
WeaponData
{
active_crosshair_count "2" //Amount of crosshairs you want to use
WeaponData
{
active_crosshair_count "2" //Amount of crosshairs you want to use
RUI_CrosshairData
{
Crosshair_1
{
"ui" "ui/crosshair_alternator"
}
Crosshair_2
{
"ui" "ui/crosshair_tri"
}
}
}
RUI_CrosshairData
{
Crosshair_1
{
"ui" "ui/crosshair_alternator"
}
Crosshair_2
{
"ui" "ui/crosshair_tri"
}
}
}
```

**To add more crosshairs add another Crosshair\_\ X following the
Expand All @@ -69,33 +69,33 @@ Simply add the following line below the "ui" line
Below the "ui" line, Like this:

```
{
RUI_CrosshairData
{
RUI_CrosshairData
{
Crosshair_1
{
"ui" "ui/crosshair_alternator" //THis is the Croshair
"base_spread" "3.0" //This is a spread Multiplier, Line doesn't exist by default
}
}
}
Crosshair_1
{
"ui" "ui/crosshair_alternator" //THis is the Croshair
"base_spread" "3.0" //This is a spread Multiplier, Line doesn't exist by default
}
}
}
```

* This only affects the visual spread of the crosshair, not the actual bullet spread. Positive Values increase spread while negative decrease it. By default it is based on the weapon's own stats.

## No Crosshair?

```
WeaponData
{
RUI_CrosshairData
{
Crosshair_1
{
"ui" "ui/crosshair_sniper_amped" //This means NO crosshair
}
}
}
WeaponData
{
RUI_CrosshairData
{
Crosshair_1
{
"ui" "ui/crosshair_sniper_amped" //This means NO crosshair
}
}
}
```

## Crosshair Index:
Expand Down
38 changes: 19 additions & 19 deletions docs/Modding/guides/keyvalue/localisation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ Languages natively supported by Titanfall2 are:
Here's what a translation file looks like:

```json
"lang"
"lang"
{
"Language" "english"
"Tokens"
{
"Language" "english"
"Tokens"
{
"MENU_LAUNCH_NORTHSTAR" "Launch Northstar"
"MENU_TITLE_MODS" "Mods"
"RELOAD_MODS" "Reload Mods"
"WARNING" "Warning"
"CORE_MOD_DISABLE_WARNING" "Disabling core mods can break your client!"
"DISABLE" "Disable"
}
"MENU_LAUNCH_NORTHSTAR" "Launch Northstar"
"MENU_TITLE_MODS" "Mods"
"RELOAD_MODS" "Reload Mods"
"WARNING" "Warning"
"CORE_MOD_DISABLE_WARNING" "Disabling core mods can break your client!"
"DISABLE" "Disable"
}
}
```

It begins with the `"lang"` instruction, contains a `"Language"` key indicating
Expand All @@ -58,11 +58,11 @@ For example, Northstar translation files are named
You can import them from your `mod.json` manifesto this way:

```json
{
"Localisation": [
"resource/northstar_client_localisation_%language%.txt"
]
}
{
"Localisation": [
"resource/northstar_client_localisation_%language%.txt"
]
}
```

!!! note
Expand All @@ -80,19 +80,19 @@ For example, to translate the "Launch Northstar" button on main menu, instead of
calling:

```
AddComboButton( comboStruct, headerIndex, buttonIndex++, "Launch Northstar" )
AddComboButton( comboStruct, headerIndex, buttonIndex++, "Launch Northstar" )
```

We'll use:

```
AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_LAUNCH_NORTHSTAR" )
AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_LAUNCH_NORTHSTAR" )
```

You can also use the `Localize` method client-side:

```
Localize( "#MENU_LAUNCH_NORTHSTAR" )
Localize( "#MENU_LAUNCH_NORTHSTAR" )
```

## Northstar translations
Expand Down
Loading

0 comments on commit d3e1a42

Please sign in to comment.