https://github.com/iamdroppy/hotstargen
RDR3: A simple yet useful nativedb to code conversor with Liquid support
https://github.com/iamdroppy/hotstargen
rdr2 rdr2-converter rdr2-scripting rdr3
Last synced: about 1 month ago
JSON representation
RDR3: A simple yet useful nativedb to code conversor with Liquid support
- Host: GitHub
- URL: https://github.com/iamdroppy/hotstargen
- Owner: iamdroppy
- Created: 2021-10-17T21:31:16.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-18T07:04:30.000Z (over 4 years ago)
- Last Synced: 2025-01-27T05:25:09.483Z (over 1 year ago)
- Topics: rdr2, rdr2-converter, rdr2-scripting, rdr3
- Language: C#
- Homepage:
- Size: 414 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HotstarGen
RDR3: A simple yet useful nativedb to code conversor with Liquid support
## Binaries
.NET 5 portable binaries are uploaded in the Release Folder.
## Natives
You can find updated natives at https://github.com/alloc8or/rdr3-nativedb-data
## Samples
This is CLI, you can use `--help` anytime to get argument help.
### C#
Command:
`-i csharp.liquid -e .cs -o output -y -v`
*input template csharp.liquid, export with extension .cs, on folder output, without ask any prompt, in verbose mode.*
It will lookup for the native.json on the folder, but you can use `-n native_custom.json` or `--natives native_custom.json`
Template file:
```csharp
using System;
namespace Hotstar
{
public enum NATIVE_{{ category }} : ulong
{ {% for native in natives %}
{% if native.comment != "" %}
///
/// {{ native.comment | replace: "\n", "\n /// " }}
///
{% for params in native.params %}
/// > {{ params.type }} {{ params.name }}
{%endfor%}
///
///
{% endif %}
{{ native.name }} = {{ native.hash }},
{% endfor %}
}
public static class NATIVE_{{ category }}_EXTENSIONS
{
public static void Call(this NATIVE_{{ category }} hash, params RDR2.Native.InputArgument[] arguments)
{
RDR2.Native.Function.Call((ulong) hash, arguments);
}
public static T Call(this NATIVE_{{ category }} hash, params RDR2.Native.InputArgument[] arguments)
{
return RDR2.Native.Function.Call((ulong) hash, arguments);
}
}
}
```
The template system can output to any language or framework.
Output sample:
```csharp
///
/// STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "V_FIB01_cur_elev");
/// STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "limbo");
/// STREAMING::REQUEST_MODELS_IN_ROOM(l_13BB, "V_Office_gnd_lifts");
/// STREAMING::REQUEST_MODELS_IN_ROOM(l_13BB, "limbo");
/// STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "v_fib01_jan_elev");
/// STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "limbo");
///
/// > Interior interior
/// > const char* roomName
///
///
REQUEST_MODELS_IN_ROOM = 0x8A7A40100EDFEC58,
///
/// Unloads model from memory
///
/// > Hash model
///
///
SET_MODEL_AS_NO_LONGER_NEEDED = 0xE532F5D78798DAAB,
```