File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1801,7 +1801,7 @@ namespace RE::ID
18011801 inline constexpr REL::ID AllFormsEditorIDMapLock{ 4796477 };
18021802 inline constexpr REL::ID GetFile{ 2193103 };
18031803 inline constexpr REL::ID GetFormByNumericID{ 2193092 };
1804- inline constexpr REL::ID GetFormEnumString{ 1529598 };
1804+ inline constexpr REL::ID GetFormEnumString{ 1309967 };
18051805 inline constexpr REL::ID GetFormTypeFromString{ 2193108 };
18061806 inline constexpr REL::ID SetTemporary{ 2193125 };
18071807 }
Original file line number Diff line number Diff line change @@ -50,6 +50,15 @@ namespace RE
5050 return nullptr ;
5151 }
5252
53+ template <std::uint16_t SIZE>
54+ inline void SetParameters (SCRIPT_PARAMETER (&a_params)[SIZE])
55+ {
56+ paramCount = SIZE;
57+ parameters = a_params;
58+ }
59+
60+ void SetParameters ();
61+
5362 // members
5463 const char * functionName{ " " }; // 00
5564 const char * shortName{ " " }; // 08
Original file line number Diff line number Diff line change @@ -187,6 +187,17 @@ namespace RE
187187 return form ? form->As <T>() : nullptr ;
188188 }
189189
190+ [[nodiscard]] static std::uint32_t GetFormCode (ENUM_FORM_ID a_formType)
191+ {
192+ auto formEnumString = GetFormEnumString ();
193+ return formEnumString[std::to_underlying (a_formType)].formCode ;
194+ }
195+
196+ [[nodiscard]] std::uint32_t GetFormCode () const
197+ {
198+ return GetFormCode (GetFormType ());
199+ }
200+
190201 [[nodiscard]] static std::span<FORM_ENUM_STRING, 159 > GetFormEnumString ()
191202 {
192203 static REL::Relocation<FORM_ENUM_STRING (*)[159 ]> functions{ ID::TESForm::GetFormEnumString };
Original file line number Diff line number Diff line change 1+ #include " RE/S/SCRIPT_FUNCTION.h"
2+
3+ namespace RE
4+ {
5+ void SCRIPT_FUNCTION::SetParameters ()
6+ {
7+ paramCount = 0 ;
8+ parameters = nullptr ;
9+ }
10+ }
You can’t perform that action at this time.
0 commit comments