Skip to content

Commit

Permalink
various docs updates, changelog update
Browse files Browse the repository at this point in the history
added up to date locations in api.txt

make sure all .vscode files are ignored

repo template readme updated for new domain

Update installation guide to be inline with 3.0

devlogs and bp macros pages

update pages for 3.0

update changelog with docs changes

and backport the stuff not added in before

remove test comment
  • Loading branch information
Buckminsterfullerene02 committed Feb 7, 2024
1 parent 78bd901 commit b26713f
Show file tree
Hide file tree
Showing 14 changed files with 486 additions and 34 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ _ReSharper*/

# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
Expand Down
4 changes: 4 additions & 0 deletions assets/API.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
FOR MOST UP TO DATE VERSION OF THIS DOCUMENTATION, PLEASE VISIT:
- IF YOU ARE ON LATEST RELEASE: https://docs.ue4ss.com/lua-api/
- IF YOU ARE ON LATEST EXPERIMENTAL; https://docs.ue4ss.com/dev/lua-api

Table Definitions
- The definitions appear as: FieldName | FieldValueType
- Fields that only have numeric field names have '#' as their name in this definition for clarity
Expand Down
4 changes: 4 additions & 0 deletions assets/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ TBD
## New

### General
Added new docs pages for devlogs, C++ examples, C++ BP macros - Buckminsterfullerene

### Live View

Expand All @@ -19,6 +20,7 @@ TBD
## Changes

### General
Update docs installation guide for 3.0.0 - Buckminsterfullerene

### Live View

Expand All @@ -36,10 +38,12 @@ TBD
### General

### Live View
Fix gui crash when clicking close window button ([#337](https://github.com/UE4SS-RE/RE-UE4SS/pull/337)) - localcc

### UHT Dumper

### Lua API
Fix FindObject and Mod:SetSharedVariable userdata type matching ([#342](https://github.com/UE4SS-RE/RE-UE4SS/pull/342)) - Lyrth

### C++ API

Expand Down
2 changes: 1 addition & 1 deletion docs-export/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def export_version(ref, name):
readme_path = os.path.join(src_dir, 'README.md')
with open(readme_path, 'r') as file:
lines = file.readlines()
lines.insert(2, '\n> WARNING: This is the dev version of the UE4SS docs. The API and features are subject to change at any time. If you are developing mods for UE4SS, you should reference the [latest release](../release) instead.\n')
lines.insert(2, '\n> WARNING: This is the dev version of the UE4SS docs. The API and features are subject to change at any time. If you are developing mods for UE4SS, you should reference the [latest release](../release) instead.\n\n')
with open(readme_path, 'w') as file:
file.writelines(lines)

Expand Down
2 changes: 1 addition & 1 deletion docs-repo-template/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Wiki

https://ue4ss-re.github.io/docs/
https://docs.ue4ss.com/
7 changes: 6 additions & 1 deletion docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@
- [RegisterConsoleCommandHandler](./lua-api/global-functions/registerconsolecommandhandler.md)
- [RegisterConsoleCommandGlobalHandler](./lua-api/global-functions/registerconsolecommandglobalhandler.md)
- [Examples](./lua-api/examples.md)
- [Creating a Lua Mod](./guides/creating-a-lua-mod.md)
- [Using Custom Lua Bindings](./guides/using-custom-lua-bindings.md)
- [C++ API](./cpp-api.md)
- [BP Macros](./cpp-api/bp-macros.md)
- [C++ Examples](./cpp-api/cpp-examples.md)
- [Creating a C++ Mod](./guides/creating-a-c++-mod.md)
- [Installing a C++ Mod](./guides/installing-a-c++-mod.md)
Expand All @@ -97,4 +100,6 @@
- [Installing a C++ Mod](./guides/installing-a-c++-mod.md)
- [GUI tabs with a C++ Mod](./guides/creating-gui-tabs-with-c++-mod.md)
- [Creating a Lua Mod](./guides/creating-a-lua-mod.md)
- [Using Custom Lua Bindings](./guides/using-custom-lua-bindings.md)
- [Using Custom Lua Bindings](./guides/using-custom-lua-bindings.md)
- [Devlogs](./devlogs.md)
- [DataTables in UE4SS](./devlogs/datatables-in-ue4ss.md)
7 changes: 4 additions & 3 deletions docs/cpp-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

These are the C++ API functions available in UE4SS, on top of the standard libraries that C++ comes with by default and the reflected functions available in Unreal Engine.

For version: **2.6**.

Current status: **incomplete**.
You are expected to have a basic understanding of C++ and Unreal Engine's C++ API before using these functions.

You may need to read code in the [UEPsuedo](https://github.com/Re-UE4SS/UEPseudo) repository (more specifically, the `include/Unreal` directory) to understand how to use these functions.

For version: **3.0.0**.

Current status: **incomplete**.
159 changes: 159 additions & 0 deletions docs/cpp-api/bp-macros.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
# Blueprint Macros

The following macros are used to manipulate blueprint functions from C++.

> **Note:** Param names for wrappers must be identical to the names used for the function in UE, and they should then be passed to macros with a `PropertyName` param as shown in `AActor.cpp`.
This does not apply to macros with the `_CUSTOM` suffix.

With those macros you have to supply both the UE property name as well as the name of your C++ param.

These `_CUSTOM` suffixed macros are useful when the UE property name contains spaces or other characters that aren't valid for a C++ variable.

## Regular macros:
Intended for normal use by modders.

### `UE_BEGIN_SCRIPT_FUNCTION_BODY`:
Finds non-native (meaning BP) UFunction by its full name without the type prefixed, throws if not found.


### `UE_BEGIN_NATIVE_FUNCTION_BODY`:
Same as above except for native, meaning non-BP UFunctions.

See: `AActor::K2_DestroyActor`


### `UE_SET_STATIC_SELF`:
Used for static functions, and should be the CDO to the class that the UFunction belongs to.

See: `UKismetNodeHelperLibrary::GetEnumeratorUserFriendlyName.`


### `UE_COPY_PROPERTY`:
Copies the property of the supplied name into the already allocated params struct.
- Param 1: The name, without quotes, of a property that exists for this UFunction.
- Param 2: The type that you want the underlying value to be copied as. For example, without quotes, "float" for `FFloatProperty`.


### `UE_COPY_PROPERTY_CUSTOM`:
Copies the property of the supplied name into the already allocated params struct.
- Param 1: The name, without quotes, of a property that exists for this UFunction.
- Param 2: A C++ compatible variable name for the property.
- Param 3: The type that you want the underlying value to be copied as. For example, without quotes, "float" for `FFloatProperty`.


### `UE_COPY_STRUCT_PROPERTY_BEGIN`:
Begins the process of copying an entire struct.
- Param 1: The name, without quotes, of an ``FStructProperty`` that exists for this UFunction.


### `UE_COPY_STRUCT_PROPERTY_CUSTOM_BEGIN`:
Begins the process of copying an entire struct.
- Param 1: The name, without quotes, of an ``FStructProperty`` that exists for this UFunction.
- Param 2: A C++ compatible variable name for the property.


### `UE_COPY_STRUCT_INNER_PROPERTY`:
Copies a property from within an `FStructProperty` into the already allocated params struct.
- Param 1: The name, without quotes, of the `FStructProperty` supplied to `UE_COPY_STRUCT_PROPERTY_BEGIN`.
- Param 2: The name, without quotes, of a property that exists in the supplied `FStructProperty`.
- Param 3: The type that you want the underlying value to be copied as. For example, without quotes, "float" for `FFloatProperty`.
- Param 4: The name of the C++ variable that you're copying.

See: `AActor::K2_SetActorRotation`


### `UE_COPY_STRUCT_INNER_PROPERTY_CUSTOM`:
- Param 1: The name, without quotes, of the `FStructProperty` supplied to `UE_COPY_STRUCT_PROPERTY_BEGIN`.
- Param 2: The name, without quotes, of a property that exists in the supplied `FStructProperty`.
- Param 3: A C++ compatible variable name for the property.
- Param 4: The type that you want the underlying value to be copied as. For example, without quotes, "float" for `FFloatProperty`.
- Param 5: The name of the C++ variable that you're copying.


### `UE_COPY_OUT_PROPERTY`:
Copies the out property of the supplied name from the params struct into the supplied C++ variable.

This means the wrapper param (which is named the same as the property supplied) must be a reference, meaning suffixed with a "&".
- Param 1: The name, without quotes, of a property that exists for this UFunction.
- Param 2: The type that you want the underlying value to be copied as. For example, without quotes, "float" for `FFloatProperty`.

See: `UGameplayStatics::FindNearestActor`


### `UE_COPY_OUT_PROPERTY_CUSTOM`:
Copies the out property of the supplied name from the params struct into the supplied C++ variable.
- Param 1: The name, without quotes, of a property that exists for this UFunction.
- Param 2: A C++ compatible variable name for the property.
- Param 3: The type that you want the underlying value to be copied as. For example, without quotes, "float" for `FFloatProperty`.

This means the wrapper param (which is named the same as the property supplied) must be a reference, meaning suffixed with a "&".


### `UE_COPY_VECTOR:`
Helper for copying an FVector. Must use `UE_COPY_STRUCT_PROPERTY_BEGIN` first.
- Param 1: The C++ name, without quotes, of the FVector to copy from.
- Param 2: The name, without quotes, of the FVector, same as supplied to `UE_COPY_STRUCT_PROPERTY_BEGIN`.


### `UE_COPY_STL_VECTOR_AS_TARRAY`:
Helper for copying a TArray.
- Param 1: The name, without quotes, of an `FArrayProperty` that exists for this UFunction.
- Param 2: The C++ type, without quotes, that the TArray holds. For example, without quotes, "float", for `FFloatProperty`.
- Param 3: The C++ that the contents of the TArray will be copied into.


### `UE_CALL_FUNCTION`:
Performs a non-static function call. All non-out params must be copied ahead of this.


### `UE_CALL_STATIC_FUNCTION`:
Performs a static function call, using the CDO provided by `UE_SET_STATIC_SELF` as the static instance. All non-out params must be copied ahead of this.


### `UE_RETURN_PROPERTY`:
Copies the underlying value that the UFunction returned and returns it.
- Param 1: The type that you want the underlying value to be copied as. For example, without quotes, "float" for `FFloatProperty`.


### `UE_RETURN_PROPERTY_CUSTOM`:
- Param 1: The type that you want the underlying value to be copied as. For example, without quotes, "float" for `FFloatProperty`.
- Param 2: The name, without quotes, for the property of this function where the return value will be copied from.


### `UE_RETURN_VECTOR`:
Helper for returning an `FVector`.


### `UE_RETURN_STRING`:
Helper for returning an `FStrProperty`. Converts to `StringType`.


### `UE_RETURN_STRING_CUSTOM`:
Helper for returning an `FStrProperty`. Converts to `StringType`.
- Param 1: The name, without quotes, for the `FStrProperty` of this function where the return value will be copied from.


### `WITH_OUTER`:
Used for templated C++ types passed to macros, like TArray or TMap.

For example, pass, without quotes, `WITH_OUTER(TMap, FName, int)` instead of `TMap<FName, int>` to all macros.

## Internal macros

These are only used by other macros, or by users of our C++ API if they properly understand the internals of the macros, and this requires preexisting knowledge around how UFunctions work, and you'll likely have to [BPMacros.hpp](https://github.com/Re-UE4SS/UEPseudo/blob/main/include/Unreal/BPMacros.hpp) to understand how to use them properly.

### `UE_BEGIN_FUNCTION_BODY_INTERNAL`:
Throws if the UFunction doesn't exist, and allocates enough space (on the stack when possible, otherwise the heap) for the params and return value(s).


### `UE_COPY_PROPERTY_INTERNAL`:
Finds the property, and throws if not found.


### `UE_COPY_PROPERTY_CUSTOM_INTERNAL`:
Finds the property with the supplied name, and throws if not found.


### `UE_RETURN_PROPERTY_INTERNAL`:
Finds the property to be used for the return value, throws if not found.
3 changes: 3 additions & 0 deletions docs/cpp-api/cpp-examples.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# C++ Examples

## Template repository for making UE4SS C++ mods: [UE4SSCPPTemplate](https://github.com/UE4SS-RE/UE4SSCPPTemplate)

### Example repo 1: [kismet-debugger](https://github.com/trumank/kismet-debugger) - trumank
5 changes: 5 additions & 0 deletions docs/devlogs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Devlogs

This section will contain a list of development logs that have been written by contributors of UE4SS. These logs are intended to be a way for contributors to share their experiences and knowledge with the community, and to provide a way for the community to understand the development process of UE4SS.

### [DataTables in UE4SS](./devlogs/datatables-in-ue4ss.md) - bitonality (2024-02-07)
Loading

0 comments on commit b26713f

Please sign in to comment.