A modified game executable using BUzzer's x64 fork that adds a bunch of new functions and options for modders to play around with.
Made by NutBoi & Nate with the help of the Frictional games discord community.
Current version: 1.1
Also linux and mac are currently not supported to my knowledge, if you want to make a port for them, feel free to, the more people who can use this, the better.
- Infinite lanterns.
- Multiple arms (not fully working as expected yet).
- A way to remove notes from the journal.
- AngelScript Update().
- Fixed timer loop crash. (by zenmumbler)
- Setting The rotation of entities.
- Attaching the camera to entities on command.
- Doubled shadow resolutions for spotlights.
- Some other miscellaneous functions:
- Getting rotation of player camera/entities
- Getting position of specific bones (rotation is broken, don't know fully why)
- A lerp function for floats (don't know if it works as expected yet)
There has to be a lantern.ho file for every lantern you need, with a very specific naming rule.
Each lantern has to be lantern(number).ho
Example: lantern31.ho
Now that you've set up the files you can dynamically switch between them with the function:
void SetLantern(int alLanternNum);
- alLanternNum - The number the lantern should be switched to.
You can also get the lantern number it's on currently if you ever needed to, with the function:
int GetLantern();
deafult lantern is 0 on startup, lantern saves when saving the game.
have a few new customisable options:
LanternOffSound: The sound that will play when the lantern is turned off. (default ui_lantern_off)
LanternOnSound: The sound that will play when the lantern is turned on. (default ui_lantern_on)
LanternNoOilSound: The sound that will play when the lantern is out of oil and is tried to turn on. (default ui_lantern_off)
LanternOilDrainSpeed: The speed the oil will drain from that specific lantern (default 0.23)
this is pretty straightforward, only 2 functions for now.
(note: this does not work on diaries, that will have its own function in the future)
(note 2: this is not reversible, if you remove a note, it's gone forever unless there's an exact copy somewhere else or you add it via AddNote();)
to remove a specific note:
void RemoveNote(string &in entry);
- entry - The name of the entry the note has. this is the same as in the lang file.
to remove all notes:
void RemoveAllNotes();
as simple as that, all notes will be gone.
A function that gets called every frame.
void OnUpdate(float afTimeStep){}
- afTimeStep - time in between calls (so to account for missed frames)
(putting SetLanternActive right before you change it will also not work, best approach is to make sure the lantern is turned off and disbling the ability to turn it back on until after change, up to user how to do this.)
Default arm is 0 on startup, arm saves when saving the game.
Similar implementation to the lantern, have hands(number).ent and they will correspond to the integer you put in. this will not change even when i properly implement infinite arms.
Functions:
void SetArm(int arm);
- arm - the arm that should be equipped
void GetArm();
It will return the rotation from the axis the function describes.
Functions:
Camera:
float GetCameraRotationX();
float GetCameraRotationY();
float GetCameraRotationZ();
Entity:
GetEntityRotationX(string &in asName, int body);
GetEntityRotationY(string &in asName, int body);
GetEntityRotationZ(string &in asName, int body);
- asName - Name of the entity to get the rotation from.
- body - The body of the entity to get the rotation from (if you're not sure, go with 0)
It will set the world rotation for the entity body selected.
void SetEntityRotation(string &in asName, float afrX, float afrY, float afrZ, int body);
- asName - name of the entity
- afrX - rotation in the X axis that should be set
- afrY - rotation in the Y axis that should be set
- afrZ - rotation in the Z axis that should be set
- body - body of the entity that the rotation should be applied to (if you're not sure, go with 0)
(Untested)
void SetEntityRotationAndPosition(string &in asName, float afrX, float afrY, float afrZ, float afpX, float afpY, float afpZ, int body);
- asName - name of the entity
- afrX - rotation in the X axis that should be set
- afrY - rotation in the Y axis that should be set
- afrZ - rotation in the Z axis that should be set
- afpX - position in the X axis that should be set
- afpY - position in the Y axis that should be set
- afpZ - position in the Z axis that should be set
- body - body of the entity that the rotation should be applied to (if you're not sure, go with 0)
You can get the specific location of bones with:
float GetBonePosX(string &in asEntity, string &in asBone);
float GetBonePosY(string &in asEntity, string &in asBone);
float GetBonePosZ(string &in asEntity, string &in asBone);
- asEntity - name of the entity (must have a skeleton)
- asBone - name of the bone in the entity (get with the ModelEditor)
But this is experimental and i'm not even sure if it works, i haven't had luck myself.
float GetBoneRotX(string &in asEntity, string &in asBone);
float GetBoneRotY(string &in asEntity, string &in asBone);
float GetBoneRotZ(string &in asEntity, string &in asBone);
- asEntity - name of the entity (must have a skeleton)
- asBone - name of the bone in the entity (get with the ModelEditor)
You can attach the camera to any entity. (BEWARE: THIS DOES NOT PREVENT THE PLAYER FROM MOVING, YOU NEED TO DO THIS ON YOUR OWN, ALSO, ONCE THE FUNCTION IS OVER, THE CAMERA WONT RETURN TO THE POSITION IT WAS IN BEFORE: IT WILL CARRY THE ROTATION OF THE ENTITY BACK TO THE PLAYER.)
void AttachPlayerCameraToEntity(string &in asProp);
- asProp - Entity the camera will be attached to.
void DetachPlayerCamera();
Some other lesser functions added to remodded for various purposes.
bool CheckEntityLineOfSight(string &in asEntity1, string &in asEntity1);
- asEntity1 - entity 1
- asEntity2 - entity 2
CheckIfEnemyDetectsPlayer(string &in asEnemy);
- asEnemy - enemy checked.
This will linearly interpolate a and b by t (Alan, please test.)
float fLerp(float a, float b, float t);
- a - float.
- b - float.
- t - float.
Should be as simple as BUzzer's x64 fork.