#enfusion_scripting
1 messages · Page 1 of 1 (latest)
if you're not replicating your functionality correctly then you'll have different results when testing on a dedi
[RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
AudioSystem.PlaySound("Sounds/Score.wav");
in this func it should replicate it to all clients
but on dedi, it only fire one time
@river imp u want me to send u full code?
No
AudioSystem.PlaySound doesn't seem to be called in any vanilla scripts. Which to me would indicate it's not the proper way to actually be playing sounds.
Works for me
I never said it didn't work.
Do you have any suggestion to make the sound fire more than one on dedicated server, streamed to all clients connected?
bro i told u is a trigger each time the player walk in it fire...
In my tests it works perfectly fine.
be more specific about what you mean
If your trigger entity isn't set up correctly it will only fire the first time
a trigger in specific position, player walk in , sound need to fire each time he go there, once the player need to hear it as well
evrithing in the trigger fire everytime, i told u is just the AUDIO trhat fire just 1 time
ao frate damme na mano
oh. i didnt think about that. good to know. thx
I would say it's moreso unusable because you can't mod that class to begin with.
I'm in the open source everon life mod im trying to learn how to script UI and get it to work in game
I may be wrong still very new to scripting here
but from what I understand this script EL_BetaHud.c is spawning in the ICONS and updating the food hunger and money
I'm just wanting to learn how this works so I can attempt to make the money value just display on the HUD of my mod im trying to make im referencing this mod because it works on here
so I think it spawns in the HUD because I do not see anything overwritten in chimera menu with this layout no entries with it
i don't see it in the player manager HUD components I also don't see it reference in the game mode so i have no idea how this is working other than just pure scripting alone I tried copy and pasting to see if it would work on my mod but no luck how do you guys figure this kind of stuff out I've torn it apart piece by piece but i cant seem to figure out how it works
What's EL_MoneyUtils.PREFAB_CASH?
From what I can tell it will change the money "text" when that prefab is added/removed from the owners inventory
Spawn some {5439738849229352}Prefabs/Items/Currencies/MoneyStack.et prefabs to see if it works correctly
Is there a method to replicate CharacterIdentityComponent to clients? Server side I'm running
Identity characterIdentity = identityComponent.GetIdentity();
characterIdentity.SetName(fullName);
identityComponent.CommitChanges();
But it seems clients can't see the change if they are in game when the change is made. New clients can see the change.
I stumbled across SCR_EditorToggleUIComponent while I was checking out different layouts. I had been meaning to find an event like this, just kept forgetting. I'm looking the get the playername and and ID when this is triggered.
I also saw the GameStatsApi class has EditorStart. Which path am I better going down?
Would it also work adding a event to the SetMessage() function in SCR_ChatMessageLineComponent?
ScriptedWidgetEventHandler Could solve this possibly? (Getting chatlogs)
just had a look in SCR_ChatMessage I think I can tackle this
I was talking more of the idea of using destructor for that. The class is irrelevant
OH! I was just gonna ask for you 🙂 Possible to DM?
I am not sure what it is that you are asking about
class S3C_InterfaceSettings : ModuleGameSettings
{
[Attribute(defvalue: "0.25", uiwidget: UIWidgets.Slider, params: "0 1 0.01", desc: "Changes the opacity of the 3PP crosshair")] // #locale
float m_fCrosshairOpacity;
}
//inside my modded SCR_InterfaceSettingsSubMenu
m_aSettingsBindings.Insert(new SCR_SettingBindingGameplay("S3C_InterfaceSettings", "m_fCrosshairOpacity", slider.GetName()));
LoadSettings();
sliderComponent.SetLabel("Crosshair opacity");
sliderComponent.SetShownValueMultiplier(100);
Hello, the SetShownValueMultiplier does not seem to work, my slider works fine but it goes from 0% to 1% instead of 0% to 100%, what am i doing wrong?
UpdateValue() isn't called in the slider component when calling SetShownValueMultiplier that's why it's not showing in the interface
Had to do this to make it work somehow, the final text values are not multiplied by the m_fShownValueMultiplier when m_bRoundValue is false
modded class SCR_SliderComponent : SCR_ChangeableComponentBase
{
override float UpdateValue()
{
float value;
if (m_wSlider)
value = m_wSlider.GetCurrent();
// Update displayed text, optional secondary value display
if (m_wText && m_wText.IsVisible())
{
float value1 = value * m_fValueMultiplier + m_fValueOffset;
float value2 = value * m_fSecondaryMultiplier + m_fSecondaryOffset;
if (m_bClampValue)
{
value1 = Math.Clamp(value1, m_fMinValue, m_fMaxValue);
value2 = Math.Clamp(value2, m_fMinValue, m_fMaxValue);
}
if (m_bRoundValue)
{
//value1 = RoundValue(value1 * m_fShownValueMultiplier, m_iDecimalPrecision); default
value1 = RoundValue(value1, m_iDecimalPrecision);
//value2 = RoundValue(value1 * m_fShownSecondaryMultiplier, m_iDecimalPrecision); default
value2 = RoundValue(value2, m_iDecimalPrecision);
}
value1 *= m_fShownValueMultiplier; // <-- moved here otherwise it's only multiplied if m_bRoundValue is true
value2 *= m_fShownSecondaryMultiplier; // <-- same
m_wText.SetTextFormat(m_sFormatText, value1, value2);
}
return value;
}
//------------------------------------------------------------------------------------------------
override void SetShownValueMultiplier(float multiplier)
{
super.SetShownValueMultiplier(multiplier);
UpdateValue(); //<-- added this otherwise the display text does not update when calling this function
}
};
I'll let it here if someone needs in the future idk
I enabled "Log actions" in the Diag menu under Game code -> User Actions. But do not see any logs for user actions in the console. Am I missing something?
I got a TouchComponent and use SetEventMask(EntityEvent.Touch) on a box and on my chimera character, but when i collide with the box nothing happens in my EOnTouch function, is it normal?
There's also an OnContact event, whats the difference between those?
OnContact works because those two entities have rigidbodies, so what's EOnTouch for?
iirc, EOnTouch fires once when something touches the object and EOnContact fires the entire time something is contacting the object.
I was messing with EOnTouch last night and couldn't get it to fire at all though.
Not sure what's changed.
You do have to set the active entity flag
but even so, nothing happens.
It used to work
oh
class ZEL_TouchTestEntity : GenericEntity
{
//------------------------------------------------------------------------------------------------
override private void EOnTouch(IEntity owner, IEntity other, int touchTypesMask)
{
PrintFormat("OnTouch triggered by entity %1 of type %2", other,touchTypesMask);
}
//------------------------------------------------------------------------------------------------
void ZEL_TouchTestEntity(IEntitySource src, IEntity parent)
{
SetFlags(EntityFlags.ACTIVE);
SetEventMask(EntityEvent.TOUCH);
}
//------------------------------------------------------------------------------------------------
}
Used to be all you need ^
Yeah i saw that in the SCR_SectorSpawn entity script
I guess the functionality was removed. Yet another change that wasn't documented in any patch notes (that I can recall).
if u can help me to understand a simple fact, are AudioSystem wave file are n1 single shoot , do the audio channel need to be cleaned before another execution?
Can i block item pickup by specific player without changes in player prefab? I tried use "InventoryItemComponent" in item, but didnt find any way.
how to teleport player from server ?
When the game ends, how to know what team won?
What does it mean the description at WorldTimestamp GetServerTimestamp();
"This timestamp may jump forward or experience time dilation (slow down or speed up), but it will never go backwards."
How Slow down or Speed up? Is it sensitive to Day/Night Duration? Or what?
sorry for tagging an old post but did you manage to solve this issue? Still getting Reason: Dedicated server is not correctly configured to connect to the BI backend. error 😦
That means your server isn't connecting to the backend?
for some reason GetGame().GetBackendApi().GetPlayerIdentityId returns null 😦
Because your server isn't connected to the backend
The error gives you a link to follow
If you only get that error sometimes then it could just be that the backend is down.
GetGame().GetBackendApi().GetBackendEnv() returns production
Jump to the message that you replied to and scroll down. Mario gives the correct answer. I've never had that issue but, would assume from the error that it is server/backend related but, apparently it isn't.
yeah it's because [RestApi] ID:[3] TYPE:[EBREQ_GAME_ListBlockedUsers] Error Code:400 - Bad Request, apiCode="InvalidInput", uid="blablabla", message="accessToken can't be empty"
I suppose
thanks anyway! will dig into
Actually after further reading Ark explained that it wasn't the issue. So now I have no idea what it is lol
It must be server/backend related then.
you must use this in or after OnPlayerAuditSuccess from SCR_BaseGameModeComponent triggered
I didn't think to ask but, just assumed that he wasn't calling it himself and the mod was spitting the error when it tried to get the PlayerIdentityId
yep it's
{
WaitForUid(playerId);
}
else
{
EDF_ScriptInvokerCallback1<int> callback(this, "WaitForUid");
m_pGameMode.GetOnPlayerAuditSuccess().Insert(callback.Invoke);
}
```
looks nice enough i dont much about EDF or GetBackendEnv stuff
koth is using a slightly modified EDF version
static string GetPlayerUID(int playerId)
{
#ifdef WORKBENCH
return string.Format("bbbbdddd-0000-0000-0000-%1", playerId.ToString(12));
#endif
if (!Replication.IsServer())
{
Log("GetPlayerUID can only be used on the server and after OnPlayerAuditSuccess.", LogLevel.ERROR);
return string.Empty;
}
string uid = GetGame().GetBackendApi().GetPlayerIdentityId(playerId);
if (!uid)
{
if (RplSession.Mode() != RplMode.Dedicated)
{
// Peer tool support
uid = string.Format("bbbbdddd-0000-0000-0000-%1", playerId.ToString(12));
}
else
{
Debug.DumpStack();
Log("Dedicated server is not correctly configured to connect to the BI backend. playerId is "+playerId, LogLevel.ERROR);
}
}
return uid;
}
```
allowing to handle peer tools mainly
I haven't had to modify any of those classes and never have any issues testing in peertool
It's so weird that you have to and I don't.
for some reason for some reason i couldn't join the server 😦
maybe it is now outdated, definitely was needed to get some kind of UID when I started working on this a year ago
I've been using it since the day it was uploaded and never had any issues
are you using webproxy?
No
impossible, there is no unique BI uid for peer tools
jsonfile?
i think we are misunderstanding 😄
Yes
sorry, it was unrelated. My mistake!
I don't think we are.
I just looked at the first release on git
If you couldn't get a PlayerIdentity (then called PlayerUID) it would use "BBBBDDDD-0000-0000-0000-%1", playerId.ToString(12)
same as it does now
hum actually
the issue is that OnPlayerAuditSuccess does not trigger for peer tools
so i have to also handle OnPlayerConnected which in my case also calls GetPlayerUID method shown above
OnPlayerAuditSuccess used to get called on peer tools
That or i'm losing my mind.
I don't test on a dedi.
I've always used peer tool and distinctly recall getting the PlayerUID from on audit success
I'm sure you could do a search and see where I tell people to call it from that method
I do remember having to switch to using OnPlayerConnected though.
?
I thought it might be because of usage webproxy db somehow
oh maybe it is on client but not on server for sure
I don't remember 100% accurately.
I do know it was before the framework was even released.
per arkensor words (as much as i remember) audit success means BI servers properly auth you, so it make sens that they cant auth random peer tools
tho i suggested to use the new diag exe version to bypass this and simulate the proper behavior
Oh, I bet that's when I switched to on connected though
before I knew to use the diag executables lol
sadly not a thing AFAIK (using diag exe is required anyway for debugging but still does not trigger audit success with auto generated proper BI uid from GetGame().GetBackendApi().GetPlayerIdentityId(playerId) method)
but yeah you probably gone away from this annoying unique player testing shenanigans
Regardless, I distinctly remember getting the player UID from on audit success and i have never tested on a dedicated server.
How long ago that was I don't know
How long you were able to do that, I don't know either.
in theory there's a way to get rid off bi uid completely by just creating uuid randomly
Then you won't have persistence
anyway i'm storing all uids in the database
So I could add another identificators such as username and steamID (for PC)
You can't get their steam ID
you can ask for 😄
as a disadvantage - you'll have to use some sort of whitelist
Too much trouble
Not worth it
I have a whitelist mod
And it uses the player UID lol
No reason to add a second layer to something that's unique per account anyways
why would you create an uuid when you can use their uid
Is there a preference to do one over the other:
{
//fill the array with strings
}```
..or..
```array<string> FillArray()
{
//fill the array with strings
return filledArray
}```
I use return whenever i have one value.
out if i need multiple.
But that's just me.
In theory the first one will be faster since it does not allocate new instance of array and can reuse preallocated capacity of that array
My thoughts too. Hopefully one of the green ones could confirm this theory.
But the out array has to be pre-defined?
you always can add both: "FillArray" and "CreateArray" where the second instantiate new array and call first function
Sure. I'm curious about differences in performance and/or memory management. While it's not a about huge arrays, I'd still like to use the faster/preferred way.
@minor agate anything new with Systems or Controllers in 1.3?
🙏 arma reforger world controller 2025
I think its mah powertoys app but win + alt is making my tool play pong on my screen, cannot seem to find a keybind for debug menu, halp 
win + alt or win + ctrl
I haven't tried bvut maybe numpad can control it too?
Is there a way to toggle the debug menu instead of having to hold ndown the keys? 🤔
would love to know
Yes you can place something heavy on the keys then you dont have to hold it down
anyone know how to disable colliders on a character entity/player? currently doing:
Physics physics = owner.GetPhysics();
physics.SetInteractionLayer(EPhysicsLayerDefs.CharNoCollide);
physics.ChangeSimulationState(SimulationState.NONE);
physics.EnableGravity(false);
physics.SetVelocity(vector.Zero);
physics.SetAngularVelocity(vector.Zero);
physics.SetMass(0);
physics.SetDamping(1, 1);
physics.SetActive(ActiveState.INACTIVE);
every frame, but that isn't having any effect in a server environment.
ChangeSimulationState seems to allow me to have vehicles ignore character colliders, just need a method to have other characters ignore eachothers colliders (player and AI)
👇
just put the mutitplier to 0, should work no?
Tested it a bit and I couldnt figure out to zoom anymore, even when I switch the keybind.
☝️
I just made it call GetGame().RequestClose()
Have a look into the GameStateTransitions class
Is there a way to interact with thing outside of a vehicle? example. say you're coming to a gate, and want to be able to "interact" hit the button to open the gate without getting out of the vehicle
I would think that should be possible with scripting!
I would put the action for it up on the visor of the vehicle as if it were a garage door opener
Okay, so I'm trying to create a basic 'repelling' test using helicopters. As a starting point, I'm using a ladder for testing. I've managed to spawn the ladder as an entity child of the helicopter, so it's properly attached. Interestingly, ladders allow interaction with other objects. For example, if I climb up the ladder, I can enter a seat directly from it—but I can't do the reverse. That's the issue I'm trying to figure out right now.
Sorry to dig up a year old post, however I am trying to work out how to disable refunding of items, gear, weapons etc as supplies. I see the sell multiplier is still set to 0. Does this mean that it has not yet been implemented and therefore I have to play around with the generators to disable supplies for conflict?
I'd recommend looking at making a customer "repel" action, and allowing it to be performed by a passenger. Take a look at the handbrake, lights etc and how it works with seeing if the player is in the specific 'compartment'
Also for your ladder, u could probably just add the ladder component to the heli (could be wrong) but then you can just define the entry and exit positions to your liking.
Make an action that ejects and ragdolls the player and sets their gravity to 0.1
Done
@high hawk Thanks, I'll look into that further. Regarding the handbrake and lights, I find it quite frustrating to develop mods in this environment due to the many limitations on what I can access.
For example, I created a mod for the flashlight Flashlight Stays On When Dropped, but I couldn’t find any references to the button that toggles it on or off, as it seems to be locked behind inaccessible systems. This makes it difficult to find real use case examples in the code, which is quite irritating.
Where are you trying to "find" said actions? Just use symbol search in script editor, it's like Google but completely different
mind if i dm you?
Sure
I am only starting to mess with replication
I am trying to send code to be executed on server, after key pressed.
Here's the code:
override protected void EOnInit(IEntity owner)
{
GetGame().GetInputManager().AddActionListener("ActionToggle", EActionTrigger.DOWN, OnToggle);
}
protected void OnToggle(float value, EActionTrigger reason)
{
Rpc_AskToggle();
Rpc(Rpc_AskToggle);
}
[RplRpc(RplChannel.Reliable, RplRcver.Server)]
void Rpc_AskToggle()
{
if (!Replication.IsServer())
return;
// code
}
But the Rpc_AskToggle does not run on server as I imagined it should. What am I missing here?
Is the entity you are running rpc from owned by the client?
@thick arch I'm pretty sure "CharNoCollide" is the right approach. I use it in my code but run it client side. You're trying to run it server side?
In the words of lord Mario "You can only communicate from client to server if the client is the owner of the component, entity or system that you wanted to use for that"
Ok so this entity is a gadget, when I have this ScriptedUserAction assigned to this entity , it does run on server:
class ZEL_SpawnUserAction : ScriptedUserAction
{
ResourceName m_PrefabPath = "{FFF30795991DC01C}Prefabs/Rocks/Granite/Rock.et";
//------------------------------------------------------------------------------------------------
override bool GetActionNameScript(out string outName)
{
outName = "Spawn Rock";
return true;
};
//------------------------------------------------------------------------------------------------
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
{
if(!Replication.IsServer())
return;
Resource LoadedResource = Resource.Load(m_PrefabPath);
if(!LoadedResource)
return;
IEntity Rock = IEntity.Cast(GetGame().SpawnEntityPrefab(LoadedResource));
if(!Rock)
return;
vector WorldTransfrom[4];
pOwnerEntity.GetWorldTransform(WorldTransfrom);
Rock.SetWorldTransform(WorldTransfrom);
Rock.Update();
SCR_EntityHelper.DeleteEntityAndChildren(pOwnerEntity);
}
//------------------------------------------------------------------------------------------------
}``` (I copied and pasted code found on this channel)
@quaint basalt ScriptedUserAction is automatically performed on the server and user side by default. So not a great comparison . I can help you over a screen share if thats easier for you
Both, I have it running every frame across both the client and server
Is the player setting it on the AI? That's how I use it. As opposed to the AI setting interaction layer on themselves. For example aiEntity.GetPhysics().SetInteractionLayer(EPhysicsLayerDefs.CharNoCollide);
I have a script component on the entity itself running EOnFixedFrame (with the mask being set on EOnInit) and in that per fixed frame function I get the physics of the owner and set it to CharNoCollide.
I have tried a full per frame function (EOnFrame) with no luck.
Maybe someone else can chime in and provide more insight. I'm not sure the way you're approaching it will work. Arkensor talks about the method a bit in this message https://discordapp.com/channels/105462288051380224/976155351999201390/1133670554981904444
how to make player use spectate camera when dead ?
@quaint basalt
modded class SCR_FlashlightComponent : SCR_GadgetComponent
{
//------------------------------------------------------------------------------------------------
[RplRpc(RplChannel.Reliable, RplRcver.Server)]
void Ask_Authority_Spawn()
{
Resource LoadedResource = Resource.Load("{50A68300B537EDFA}Prefabs/Items/Food/ArmyCrackers_Soviet_01.et");
if (!LoadedResource || !LoadedResource.IsValid())
return;
IEntity Crackers = GetGame().SpawnEntityPrefab(LoadedResource);
if(!Crackers)
return;
vector WorldTransfrom[4];
m_CharacterOwner.GetWorldTransform(WorldTransfrom);
Crackers.SetWorldTransform(WorldTransfrom);
Crackers.Update();
}
//------------------------------------------------------------------------------------------------
override void OnToggleActive(bool state)
{
super.OnToggleActive(state);
if (m_bActivated)
Rpc(Ask_Authority_Spawn);
}
}
Are there any plans or ETA for Enforce Script syntax highlighting e.g. in PrismJS?
No plans
I just realized that the syntax highlighting exists on BIKI already. I guess it can't be easily ported?
I want collapse functions and classes code in script editor 
if a vanilla method commented as "// unused" does that mean that it will likely be removed in the future?
It probably just means its unused. Things that will be removed are marked as obsolete
hey can anyone tell me how to setup a new gamemode? I´m thinking of a gamemode that only shows one AO at the time for both factions, if any of the two captured the AO another single AO will be set for both factions. Is it possible to script such a scenario with the workbench? The game should give the players the optjective that need to be captured and shows it on screen when its active and when its captured
Is Loiter waypoint supported in current version? Seems that giving it to an AI, does nothing.
Thanks, works nicely.
Can someone explain how I would subscribe to this event:
void ScriptInvokerOnPossessedProxyMethod(int playerID, bool isPossessing, RplId mainEntityID);
typedef func ScriptInvokerOnPossessedProxyMethod;
typedef ScriptInvokerBase<ScriptInvokerOnPossessedProxyMethod> ScriptInvokerOnPossessedProxy;
[ComponentEditorProps(category: "GameScripted/GameMode/Components", description: "")]
class SCR_PossessingManagerComponentClass : SCR_BaseGameModeComponentClass
{
}
class SCR_PossessingManagerComponent : SCR_BaseGameModeComponent
{
protected ref map<int, RplId> m_MainEntities = new map<int, RplId>();
protected ref ScriptInvoker Event_OnPossessed; // <-- I want this one, so I know when GameMaster or any editor possessed
protected ref ScriptInvokerOnPossessedProxy Event_OnPossessedProxy;
My first question would be, as per usual. What are you actually trying to do?
I'll point it out a little closer
protected ref ScriptInvoker Event_OnPossessed; // <-- I want this one, so I know when GameMaster or any editor possessed
Or should I go to one of the editor components that have a public getter
I know want you're asking for help doing. I can read lol. I was curious as to what you're actually trying to do, because there may be other ways to achieve whatever it is you're trying to do.
I'm just trying to log gamemaster usage so I can put a little more trust into my admins. I don't really need to log everything that happens, just if it was possessed and when.
Oh okay, I'm not too sure about the gamemaster stuff but, I'll hash out something for you.
Cheers, I do think I may be on the right track with SCR_PlayerDelegateEditorComponent
Well, it's just a ScriptInvoker
in editor manager?
I been just having a look
Brings me to my next question, no experience using scriptinvokers, you cannot use protected ones right?
Probably a stupid question to most, but I wanna learn a lil
Protected is a keyword that means you can’t modify it directly, but usually there is helper method that lets you get it
If there is not you can mod the class to make a helper method which returns the script invoker
yeah just didnt know around invokers, cheers
Okay, So I'm confused a bit. Why did you want to use the SCR_PosessingManagerComponents script invoker?
hah, just found SCR_ScriptInvokerHelper 
Probably coz i scrub
Its, on GameMode, so thinking logically (for me) I looked there first
But what would the Posessing manager have to do with gm mode?
Possessing another mode?... I then went through the editor stuff. I was simply asking how to sub to an event, then we went on this lil journey together.
Plus, have you seen how much there is to the Editor side of things?
I just thought you knew something that I didn't
Wouldnt be worth the battle even if I did
Possession happens when a player takes control of a "controller" in most cases.
Define possession
So one would say possession manager could potentially lead to what I was looking for at first glance?
If GM mode had a controller that you connect to
[ComponentEditorProps(category: "GameScripted/Misc", description: "")]
class ZEL_ScriptInvokerExampleComponentClass : ScriptComponentClass{}
class ZEL_ScriptInvokerExampleComponent : ScriptComponent
{
PlayerManager m_PlayerManager;
//------------------------------------------------------------------------------------------------
override void OnPostInit(IEntity owner)
{
SetEventMask(owner, EntityEvent.INIT);
}
//------------------------------------------------------------------------------------------------
override void EOnInit(IEntity owner)
{
m_PlayerManager = GetGame().GetPlayerManager();
if(SCR_PlayerController.GetLocalControlledEntity() != owner)
return;
GetGame().GetCallqueue().CallLater(DelayedInit,1000,false,owner);
}
//------------------------------------------------------------------------------------------------
void DelayedInit(IEntity owner)
{
SCR_EditorManagerCore core = SCR_EditorManagerCore.Cast(SCR_EditorManagerCore.GetInstance(SCR_EditorManagerCore));
if (!core)
return;
SCR_EditorManagerEntity editorManager = core.GetEditorManager();
if (!editorManager)
return;
editorManager.GetOnOpened().Insert(FunctionToInvoke);
}
//------------------------------------------------------------------------------------------------
void FunctionToInvoke()
{
int PlayerID = m_PlayerManager.GetPlayerIdFromControlledEntity(GetOwner());
Rpc(Ask_Authority_PrintStuff,PlayerID);
}
//------------------------------------------------------------------------------------------------
[RplRpc(RplChannel.Reliable, RplRcver.Server)]
void Ask_Authority_PrintStuff(int PlayerID)
{
PrintFormat("%1 Opened GM Mode",m_PlayerManager.GetPlayerName(PlayerID));
}
}
Gracias, took us a while, but we got there hombre
hI here capture the flag template, working in dedicated server ( in workbench u can see the print for each rpc call but u wont hear sound's event or hint notifications else ur in dedicated ) all features of classic CTF of arma 1-2-3 , spawn no entry protection, custom stam/jump/speed etcc
try it, make it better or use it to make ur own, i hope to see many servers with ctf mode online since was my favorite mode of arma , including warfare ( old benny style )
Enjoy https://drive.google.com/drive/folders/1UtGB9tIGMjfGby0R7IUqvG9rWqF0_Jsm?usp=drive_link
Hello, Im new to scripting and have been reading the wiki's. Im having an issue where my class isnt highlighting teal and isnt being recognized as valid for configs... Does anyone know why this might be?
Well valid for configs requires a special header.
If you put a space between the: it might make it show up teal.
Also too if you're inheriting from something. You're generally going to overwrite what your putting down in your example.
Thanks for the suggestions, unfortunately adding a space before the ":" did nothing. For context im following this wiki page: https://community.bistudio.com/wiki/Arma_Reforger:Game_Master:_Context_Action_Creation#:~:text=To create a context action,new class inheriting from SCR_GeneralContextAction.&text=Whether or not the context,the ones your action requires.
What a disgusting url
I got it to work by recreating it in the game scripts folder and adding this header which I got from an existing context action. I wonder why the wiki tutorial doesnt mention the requirement of a header.
When you do base container props, It's basically going to make that into a config file generator. If I recall correctly.
So you generally don't want any real functions in it.
The general context action, might require the matching class header. I can't remember. I'd have to load up my computer and not going to do that at the moment.
Does anyone have a good way of creating a scriptable camera and then setting its transform? I found some brief convos in this channel, but no one has actually said how to create it
Now dumb question, how does one override or edit an exsiting script 😅
Essentially how do I edit a locked script 😅
do you have a sqf editer program
Yup
well if its locked i wouldnt mess with it
I want to edit the scrip (the one above) to make it so AI don't spawn until a player comes within a certain distance. I'm working on developing a PvE Conflict
what kinda file is that
So I've sort of figured this out, however it doesnt seem to allow me to SetCamera when the game master is open. Is there a way around this?
Its to help maximize the efficiency of the PvE game mode
but what kinda of file is that there
thats not a reg sqf file is it
is that a pbo file
thats just an image
so are you saying the pbo is locked
sqf is not a thing in reforger
This is where it's located, It was suggested to me to look in this file and edit it to adjust the spawn radius. I found in the code where I need to adjust it, but can't make any adjustments
Rt click > Override
oh sorry m8 im in the wrong channel oops
then add "modded" in front of the classname
lol, its okay Scotty
i dont have reforger
There is no override 😅
then duplicate and change the name to something unique to your mod
kk
Like in my pve mod, I changed SCR to CPR
like this for Modded?
I believe it worked!
I just have to make some adjustments and play around, but thank you!
I'm going to look at yours in Experimental, see what you are cooking and gain inspiration. Wanna learn and understand what this stuff does instead of copy and paste 🙂
cool I tried to write a lot of comments about what i was doing in there, hope they help!
Related
how do i make it so i can appear near radio operators without having to activate it every time the server restarts
Does a directory for FileIO operate different on Windows and Linux?
string directoryPath = "$profile:/Path1/Logs";
vs
string directoryPath = "$profile/Path1/Logs";
Or as I read from MarioE, using absolutepath is preffered? meaning just list the entire dir and the file name + extension?
Neither is correct. You need $profile:Path1/Logs. And no you must use FS prefixes, file io forbids absoluete paths outside of diag workbench
Thank you
Sooo, MapMarkers or MapEntities Editor? Idk, there is a few configs sitting in the map Dir.. More than I'd like to have seen. How would one utilize a custom marker? Or start looking, just like any info would be greatly appreciated 
What can I use to judge if a player is making contact with an object or not?
Hi - if I want to slow down the fall of a player and I have a script for that how can I attach that script to the base character so it works for every player? (this is for the rappel mod)
what are the main storage components used on players? im trying to figure out how to manipulate inventory with inventoryaction.
{
#ifndef DISABLE_INVENTORY
//------------------------------------------------------------------------------------------------
override protected void PerformActionInternal(SCR_InventoryStorageManagerComponent manager, IEntity pOwnerEntity, IEntity pUserEntity)
{
Print("Running loot action");
manager.SetLootStorage(pOwnerEntity);
array<IEntity> itemsToMove = {};
array<BaseInventoryStorageComponent> outStorages = {};
itemsToMove.Clear();
manager.GetAllRootItems(itemsToMove);
PrintFormat("total items: '%1'", itemsToMove.Count());
if (itemsToMove.IsEmpty())
Print("failed to find items");
return;
foreach (IEntity item : itemsToMove)
{
if (item)
{
PrintFormat("'%1'", item);
manager.MoveItemToVicinity(item);
manager.TryRemoveItemFromInventory(item);
}
}
}
#endif
};```
regardless of loot count im getting the same array print out.
hmm does does modifying an inventory not work as an action because the player being modified cant be modified locally by another player?
{
#ifndef DISABLE_INVENTORY
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
{
SCR_InventoryStorageManagerComponent manager = SCR_InventoryStorageManagerComponent.Cast(pOwnerEntity.FindComponent(SCR_InventoryStorageManagerComponent));
if (!manager)
return;
Print("Running loot action");
manager.SetLootStorage(pOwnerEntity);
array<IEntity> itemsToMove = {};
array<BaseInventoryStorageComponent> outStorages = {};
itemsToMove.Clear();
outStorages.Clear();
manager.GetItems(itemsToMove);
manager.GetStorages(outStorages);
PrintFormat("total items: '%1'", itemsToMove.Count());
PrintFormat("total items: '%1'", outStorages.Count());
if (itemsToMove.IsEmpty())
Print("failed to find items");
return;
foreach (BaseInventoryStorageComponent storage : outStorages)
{
foreach (IEntity item : itemsToMove)
if (item)
{
PrintFormat("'%1'", item);
manager.TryDeleteItem(item);
}
}
}
#endif
};```
What's the use case for that?
stripping gear off of a body. potentially stripping gear off a body into another storage entity.
I tried to do moveitemtovicinity() but couldnt get it to work either. counts are coming back right now as i modified it.
got it to work finally. idk why it wasnt before. i think i had a pair of brackets missing
Why do you have a nested foreach?
Can someone explain to me why the surface transform(param.TraceNorm) isn't right for creating decals on anything not the terrain?
Decal decal = world.CreateDecal(
param.TraceEnt,
intersectionPosition,
param.TraceNorm,
0.0,
2.0,
0,
5,
1,
"{A8D6D483CF4BB8FC}Assets/Decals/Blood/Blood_Pool_Decal4.emat",
10,
0xFFFFFFFF
);
If i flipped the TraceNorm then the decal partially works
Decal decal = world.CreateDecal(
param.TraceEnt,
intersectionPosition,
param.TraceNorm * -1,
0.0,
2.0,
0,
5,
1,
"{A8D6D483CF4BB8FC}Assets/Decals/Blood/Blood_Pool_Decal4.emat",
10,
0xFFFFFFFF
);
how can one draw a line on the screen in release game?
I'd assume that would have to do with the TraceEnt and how it's colliders and such are oriented
dumb mistake, wasnt needed. i fixed it now.
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
{
SCR_InventoryStorageManagerComponent manager = SCR_InventoryStorageManagerComponent.Cast(pOwnerEntity.FindComponent(SCR_InventoryStorageManagerComponent));
if (!manager)
return;
manager.SetLootStorage(pOwnerEntity);
array<IEntity> itemsToMove = {};
manager.GetItems(itemsToMove);
if (itemsToMove.IsEmpty())
return;
foreach (IEntity item : itemsToMove)
manager.TryDeleteItem(item);
}
The jacket and stuff will all be gathered from GetItems
does try delete, fully delete the entity?
there's no need to get storages too
full screen canvas maybe? surely theres an easier way
That's entirely too vague to even know what you're talking about.
draw a line. from one point to another. on the screen
the most basic form of computer graphics
Shape class does this but is only enabled in debug game
Getitems will make it so all the individual items get dumped instead of keeping them in the clothing right? i did getrootitems instead. only issue is it seems like it didnt grab the watch off the body.
GetItems gets everything
foreach (IEntity item : itemsToMove)
{
Print(items);
manager.TryDeleteItem(item);
}
You'll get null prints because it will get to an item that was in a jacket that has already been deleted because the jacket was deleted.
You have to have something to draw to. Like you said Shapes are only for debugging.
Create a layout, get the workspace, create the widget from the layout in the workspace, draw a line on it.
trydelete works but not what im doing. I am wanting the items to come off the player. in the future I might have it go into a new spawn storage on the body.
if i getitems, it will just dump every items out of each clothing piece. if i getrootitems, it gets the top level inventory.
its working fully now though.
Not sure why you were using TryDeleteItem in the first place then
That gives no indication of weather the other function will call successfully or not
always test with what you're trying to do and not some other "replacement" function
Not all functions will work just because another one does.
yeah thats true
A simple search for "Line" in Find Symbol would have given you some prime examples of what you're trying to do. Check out the MapLine class.
I just checked and this seems like not the case. Perhaps i need to translate to local cords?
But then it doesn't make sense why flipping the transform partially works ...
Hey guys! Can anyone tell how i can get via script if base is in friendly radio range or not?
For conflict
I want to repaint the default yellow flower
I'm trying to attach a camera to a players head and im losing my mind with the offset. For some reason putting a negative number in the up axis of the vector creates a positive value during runtime... No clue why. Here is my relevant code, let me know if more is required:
_unit.AddChild(entity,_unit.GetBoneIndex("Head"),EAddChildFlags.AUTO_TRANSFORM);
vector transform[4];
transform[3] = "0 -0.5 0";
entity.SetLocalTransform(transform);
This is not about yours issue, but use "Update()" func after set entities transform just in case
Storages placed at runtime, do they need to be updated once the entity they are attached too is spawn/placed in the world?
I imagine it'd be similar to how SCR_PlacingEditorComponent works with CreateEntityOwner() ?
omg lmao, never mind. Had weight set to 0 
Hey all, does anyone know, what is the proper way to RPL a .OpenMenu(...) to all players?
On this, if a prefab has a placeableinventoryitem component, it cannot use a storage component, unless I am setting it up wrong?
Opening the storage just opens the character inventory.
Zelik i need merg everon life hud of money with your money for banking
how to have entity load before another ?
put it onto a lower layer or first into the same layer
lower as in actually lower in the hierarchy ?
hierarchy has a special meaning, not sure what you mean. we simply load each layer in the order they are in and then each entity from each layer in their order. it is just co-incidence ratherr than design, but you can somewhat rely on it if you want to
Spawn the second one from within scripts, on some init of the other entity
what would be the best logical way for two nearby components to sync together? if for example I wanted both doors to open and close if even of them were touched?
how to send a message from the player to the server ?
I have found myself in same predicament, I just want to move a bone on clients 
I saw your post about turning it into a ScriptGameComponent - very weird if this works.
That is the one I said to always try to avoid
Read a bit (Just a message on top on what exact path means in this engine).
Exact Path in Engine does not mean absolute path
Question about navmesh... It has zero relation with players correct? Just a random question came into my mind about players falling through certain objects when going into an uncon state and curious if navmesh affects that.
Well hold on there for a second. I am an AI agent so I need it.
ScriptGameComponent with TickOnProxy works for alot of things I do
Yeah - on workbench my bone movement works fine, for context I am doing it on a vehicle because moving/scaling the bone is the only way for me to modify this base game vehicle. It's not working in MP and the script is running on clients, even after the switch to ScriptGameComponent. I wish there was more documentation on bone stuff haha
is iplayerID the server id (player 1,2,3,4) or the identity (498534f9-c799-43d5-xxxx-f0bbcbab5a58)?
The first one.
damn, still no way to query unique ids then?
hey would anybody know how to adjust the despawn timer on dead bodies?
garbage manager
For anyone with issues using SetBone (on a vehicle) because Animation Graph doesn't have scale node for bones, use the proc anim editor to scale bones to your delight. Even script doesn't work, ran on server and clients. #procanimforever
Does anyone know how to replicate a .OpenMenu to all players? Ive tried it with the normal method and with the BumpMe() by watching over an isActive bool.
Be a bit more specific, are you trying to open a map for all players, or simply store whether a map is open? Or something else?
I try to open a custom vote menu for all players trough the menu manager. GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.VoteMenu);
i want this to be executed for all clients
How would I iterate over all factions available in the game, not just current world?
how much of a learning curve is the reforger database mod? im thinking of using it for a project where I want the plaintext variables to be held server side maybe in a database and have the client make attempts at the data to be able to access it.
Hmmm, should the supply crate prefabs that have an actionmanager with inventory open action, also have a inventorymanager component on them by default?
How can I change the supply costs for spawning a vehicle?
under the vehicle there is a component 'SCR_EditableVehicleComponent' where you can adjust this under the 'Entity Budget Cost' header in the Campaign Value variable
You can adjust the rank needed to spawn the entity there too
if I recall correctly there is a location to override this in the conflict managers but this is topic is more for https://discord.com/channels/105462288051380224/976159829628444682
thx
How can I create a placeable area like the spawn point but instead for detecting entities? To allow a GM to place detection area that can trigger AI spawning or other events mid game
What is wrong with **SCR_EditorManagerCore **class?
It gives me exception error when i try to modded it.
My code is:
{}```
Exception is:
Reason: NULL pointer to instance. Variable 'Event_OnEditorManagerInitOwner'
Exception in:
203: SCR_InfoDisplayExtended::OnStartDraw
```202: SCR_EditorManagerCore core = SCR_EditorManagerCore.Cast(SCR_EditorManagerCore.GetInstance(SCR_EditorManagerCore));
203: core.Event_OnEditorManagerInitOwner.Insert(OnEditorInit); ```
It doesnt see or doesnt init **Event_OnEditorManagerInitOwner** parameter from vanilla class
It took me over 6 months but I think I'm finally getting the hang of EPF 
There's no need to use that mod if you're not wanting to use it along side the persistence mod. Reading from a json file on the server is easy.
I'm a bit confused, but maybe someone knows the answer or can help.
I'm currently trying to save JSON files with the UID for each player on the server with various variables in them, and I want to load these JSON files as well. How does this work exactly?
heres a great starting point for ya: https://community.bistudio.com/wiki/Arma_Reforger:JsonApiStruct_Usage
I am just starting out with scripting for enfusion. One thing that has come up is if it is possible to alter a players max movement speed when not sprinting. Assuming it is where would should I be looking within the scripts?
How experienced are you with object oriented programming?
I am familiar with C# and can read the scripts in game. It's more a case of information overload and not being quite sure where to start looking 🙂
This is your new best friend
Also read those ^
I have skimmed through these and will probably end up reading them all in my usual disjointed way. I am just unsure as to what actually controls a characters movement speed. Using the search bar only gets me so far.
Using the search bar is the only way to figure things out. And learning to find things for yourself is way more useful than having someone tell you where to look. Regardless
I think you're only valid option is CharacterControllerComponent::SetDynamicSpeed
maybe CharacterControllerComponet::SetMovement
Dynamic speed sets the lerp between min and max, I could not find an actual ability to set the max speed directly which is what I was looking for. I had thought I could limit the max dynamic speed setting but it feels ... hacky
In this game jank is sometimes the only way
like every other arma game
The movement speed of the character is tied into the speed at which the animations play
There probably isn't a way to set it directly.
Asking is normally my last option. It just surprised me that this isn't exposed. I assume they are using root motion but in other games there is normally a way of accessing animation speed. (not always admitadly).
thanks for the help. I think at least for testing purposes I will start with the dynamic speed, if anything it will allow me to see if its something worth messing with for my purposes 🙂
and perhaps that is only control I can mess with
I don't think you're gonna be able to set the speed higher than whatever the default max is.
Try getting the SCR_CharacterDamageManagerComponent and calling SetMovementDamage with a negative value lol
at least I am trying to slow it down
SCR_CharacterDamageManagerComponent Comp;
Comp = SCR_CharacterDamageManagerComponent.Cast(pUserEntity.FindComponent(SCR_CharacterDamageManagerComponent));
Comp.SetMovementDamage(0.9);
Closer to 1 the slower
But don't set to 1
that is another way. If I control speed via dynamic speed control that doesn't have to interact with the damage scripts. Only issue is detecting if a player is using a gamepad as dynamic speed is not set.
I have a starting point at least. It would be nice if there was a more direct way of affecting it rather than poking it from different places 😄
Also you'd have to somehow stop them from changing the dynamic speed
thats easy you can check current dymaic speed and set it after a threshold, the only issue is that its never set for ppl with gamepads... thinking about it however it is probably set to 1 for gamepads so they can use an analogue stick to control speed. In which case I am over thinking all this as long as I make the check and then set if the value is higher than I want then it would affect everyone the same way.
requires testing
I don't think checking the dynamic speed on tick is worth it.
thanks for the link, i got the JSON system working as in the link you sent me, but somehow the saving of the file takes place on my pc not on the server itself
Dont use JsonApiStruct lol

Did anyone have some suggestions on how to include a json file with the mod and dump it into the profile folder on first start?
If I have to create all those maps for a default config I'm gonna scream
@ocean kernel you can register the json file to be included with your mod („import and register” or whatever its called in the RMB context menu), then access it with FileIO
What would be the path to the file? Just ResourceName?
cant remember, bit I do that in my project and can look it up later
If you could it'd be great, I'll let you know if I figure it out before then
will do mate
Hi, im spawning a Prefab Local (ChimeraGame -> SpawnEntityPrefabLocal)
So, i do not add RplComponent to this prefab. But, if the Script runs and the Prefab spawns i still get Error that there is no RplComponent... For what?
Ok I found out you need to use path and not resource name, ie Assets/MyConfig/config.json
Thanks
It still requires the RplComponent no matter if it;s local or not
Local entity/component does not mean the Rpl stuff is gone, nor not needed anymore
At that point, the stuff will still be there and they will just point authority to be your client where you spawned it locally on
Oh ok, i was thinking local stuff does not required Rpl. Thanks Mario
This is why we say, to avoid IsServer and IsClient methods as well
As this specific case would be broken there 🙂
If you did it with Auth/Proxy/Owner, then it would instantly work if done locally
lol, I love finding this type of comments
Ahh fair enough, how hard would it be to implement the peristence and database mod after the fact?
I think it depends largely on your programming skills. In the end, you'd be just passing JSON back and forth between the server and external program (e.g. a database)
ahh okay
Are there any community DB drivers for EPF? MongoDB's viral licensing is incompatible with the setup of most game hosting providers and I'd rather not expose a DB over public internet
Reforger -> HTTP server -> database
Ideas for preventing AI characters from entering vehicles? Ie. immediately eject them if game master tries to jam them into a vehicle
Yeah I see the MongoDB driver is implemented as a HTTP proxy, I was just wondering if anyone already wrote one for any other DBs before I look into writing one myself
Writing a domain specific HTTP server for your project will probably be faster than learning someone else's general purpose framework
Whether it will be better or not is debatable 
I think writing my own persistence logic from scratch when I'm an Enfusion novice would be a lot more effort and time-consuming than just writing a different DB driver for someone's existing persistence framework 😄
Like EPF already persists characters and vehicles for me, if I rolled my own solution I would have to reinvent those wheels
The server does that by default even without mods tho
Writing code is easier than trying to understand it 😛 But yeah
But how would I write code to persist Enfusion data without first reading and understanding how Enfusion works? 😛
Using third party framework would require understanding it as well (I believe). When it comes to the persistence, you would be dealing with HTTP REST API using JSON in any case. It's an interface, decoupled from the internals of the engine
If you mean the vanilla FS save functionality I don't think that is very scalable beyond maybe Conflict, running a persistent mod with things like loot and vehicle spawns all over the world wouldn't you end up pretty quickly with a save file too big to load?
is the only logical way to have secure server side logic to use basesystem?? I want to store secure codes but having them client side leaves them open to being exploited.
Has anyone here got the ModifyLayers command of the WorldEditorAPI to work? I mean changing the ground surface.
This is my script. When I use the FilterMorphOperation.ADD operation it crashes and with any other it does nothing. Am I making a mistake or is this function just broken?
[ButtonAttribute("Paint Area(s)")]
protected void Paint() {
// init tool
m_API.BeginTerrainAction(TerrainToolType.SURFACE_PAINT);
TerrainToolDesc_LayerAdd toolPaint = new TerrainToolDesc_LayerAdd();
toolPaint.fOuterSize = 5;
toolPaint.fInnerSizePercent = 10;
toolPaint.fAngle = 0;
toolPaint.fAddNormalized = 1;
toolPaint.pMaterial = Material.GetMaterial(m_surface);
if(!toolPaint.pMaterial){
Print("Could not load Material! Material should have been: " + m_surface, LogLevel.ERROR);
return;
}
Print("Material: " + toolPaint.pMaterial);
// paint coords
for (int i = 10; i < 15; i++)
{
for (int j = 10; j < 15; j++)
{
m_API.ModifyLayers(i, j, FilterMorphOperation.ADD, toolPaint, FilterMorphShape.ROUND, FilterMorphLerpFunc.LINEAR);
}
}
Print("Should have done something!");
m_API.EndTerrainAction();
}
Yeah but like I've only just started dipping my toes into how stuff works around here. I work as a cloud SE for my day job so HTTP APIs are piss easy. The problem for me would be that I wouldn't know where to even start looking for the best place in Reforger script land to hook calls to my custom persistence API if I made one, I think it would take 10x longer for me to figure all that out and get my mod back to persisting what EPF already does than it would to just write a DB driver for it that other people could benefit from too
Aight, makes sense
[ public poll ]
SQFBin / EnforceScriptBin poll available here: #community_wiki message
Be warned that I am bringing the functionality of my mod in an adapted form to vanilla and will then deprecate my mods. For API design it means that you may not need to focus as much on the complex queries you can do in the mod for now, as vanilla will only be a simple key value CRUD interface primarily. Might add more complex queries later but I found out that in reality most content for mods will cross reference things via ID anyway and unpacking complex data structure to find some inner values is usually not worth the effort and the wrong thing to search for
Can i get any issue if delete all entities inside inventory in destroyed vehicle?
I remove all items from **ScriptedBaseInventoryStorageComponent **by **RemoveItem **and then call **delete **for items entity.
Even better, we have TryDelete on inventory storage manager, and a vehicle has one. but apart from that, no you can totally do that if you need to.
And one more question. How can i check access player or faction to pickup and move item? I locked it in ScriptedUserAction, but i cant do any check in inventory menu ( opens on tab ). **InventoryItemComponent ** hasnt any function to check who works with this item. I dont know how to block pickup and moving items for specific players or factions.
Locking items is for operation synchronization. Not for disabling anything for gameplay. Modding the user actions is the correct approach
I have briefcase that can be placed in inventory. I want block any inventories operations with this briefcase for one faction for mission. I can do that by custom ScriptedUserAction, but cant block operations from inventory that opens by TAB button.
I can block dragAndDrop by disabling **Draggable ** in InventoryItemComponent, but right mouse button ignores that
Ah that ... Uhm good question. I'll think about it
player identity is the unique id for a player right? im assuming because playerid is different based on when they have joined?
Wassup gang. Trying to script BTR in reforger tools to fire the turret on command. I was able to do it with the vehicletrack in cinematic tools but it fires the machine gun instead of main cannon. Can someone point me towards where i might find the name of the primary cannon or any info related? Thanks
what was the script you are using to fire?
i just looked at the turret and the main cannon should be HMG_KPVT
I actually used the "vehicletrack" (cinematic timeline event) but it only has the option for "turret shot" and i cant find anywhere to command which turret so assumed I would have to manually script it instead. I had a lot of trouble trying to use the turret components though, when i added turretcontrollercomponent the BTR turns invisible.
You're the goat. Where did you find it?
in resource browser you can grab seperate components of vehicles so i grabbed the turret and there was 2 weaponslotcomponents. one with the main gun and one with the coax.
Dope thanks for the info and your time!
Can i get players entity from vehicle?
Yeah get the slots
yes. i founded already
``` Vehicle vehicle = Vehicle.Cast(GetOwner());
if (vehicle)
{
SCR_BaseCompartmentManagerComponent mngr = SCR_BaseCompartmentManagerComponent.Cast(vehicle.FindComponent(SCR_BaseCompartmentManagerComponent));
array<BaseCompartmentSlot> compartments = {};
mngr.GetCompartments(compartments);
foreach (BaseCompartmentSlot compartment: compartments)
{
if (compartment)
{
ChimeraCharacter character = ChimeraCharacter.Cast(compartment.GetOccupant());
if (character)
{
// do smf
}
}
}
}```
Is there actually anyway to rotate the player's first person camera? Eg: Forward and Backward, Left and Right (in code)
drag ur mouse to the left or right 
crazy
That's what I was gonna say

You guys have astonished me with your amazing skill, yet my problem hasn't been solved 🤔
What have you tried?
Whenever I call like SetYawPitchRoll() it doesn't actually update the camera
Animations probably override your call
Animations don't control the actual camera movement, but the head
CameraBase camera = cameras.Get(0);
vector angles = camera.GetYawPitchRoll();
angles[0] = 0; // Set angle to 0
camera.SetYawPitchRoll(angles);
Here is what I'm doing
Internal code uses this function, and theirs works
Where does it do that?
m_camera = g_Game.FindEntity(m_cameraEntityName);
vector angles = Math3D.QuatToAngles(outQuat);
m_camera.SetYawPitchRoll(angles);
AutoTestGrid.c and MotionComponent.c
Have you used AutoTestGrid to see if it works?
Have no idea what it is, but looking at it, it seems its not meant for actual game
Well excuse me for B.I.s mistake.
File name vs content
My only idea is something if overriding it but I can't find it, or know how to find whats accessing it
Like I said, Animations override bone positions.
Recoil isn't an animation, it's procedural and it can move camera, and so can in free cam, and so on. It's possible
@livid pagoda
can it help u ?
{
override void OnUpdate(float pDt, out ScriptedCameraItemResult pOutResult)
{
super.OnUpdate(pDt, pOutResult);
PrintFormat("%1", pOutResult.m_CameraTM);
}
}```
I put into a script file and nothing is being printed out for me
Reload scripts and enter in player 1th person view?
How often should it print?
every frame
Huh, even with saving and reloading even if there is an error in the file it's not reloading it
Got it
Can I modify it here or something?
Oooo I can, last problem is I'm really bad at transforms and don't know how I would like add 45 degrees
do constructors only work for Managed classes? when i do
{
void Something()
{
// does not get run
}
}
but as soon as i change to
class Something : Managed
it does get run
nope jk constructor still doesnt run
How are you instantiating the class?
class Something
{
void Something()
{
Print("YO!");
}
}
Something Dude = new Something();
SCRIPT : YO!
yeah just like that
well singleton style
static RE_AdminESPManager GetInstance()
{
if (!m_Instance)
{
// i cant figure out how to make consturcotr work FEREEEEEEEEEEEEE
m_Instance = new RE_AdminESPManager();
m_Instance.Init();
}
return m_Instance;
}
i just added the Init since constructor wasnt being called 🤔
must be user error. thanks zelik
Looking at prefab "explosions TNT small" TimerTriggerComponent. I was trying to see if I could create an explosion as a cone from an origin rather than a sphere around an origin. When I look at the properties of this component I can't seem to find any actual script that I can interact with, should I just assume its all engine code?
Tried searching for explosion in 'find symbol' and didn't come across anything that helped point me in the right direction.
Just looking for a lead because I've stalled a little on this.
Excuse me for a dumb question, but are interfaces a thing currently or will they be in future when it comes to Enforce Script?
@dark ocean FileIO.OpenFile doesnt work with included json files in dedicated server, but SCR_JsonLoadContext.LoadFromFile does work
?????
But FileIO.OpenFile works in WB
FileIO is for direct file access, by passing virtual file system usually. Meant for workbench plugins mostly. Workbench has full operating system access to file io, hence the dangerous api call confirm window when used. load context uses the normal game file system which can handle everything - and is locked down partially for normal game executable
Weird inconsistency and of course zero logs when using FileIO
Logs could have told me
I guess its workaround time
I guess I can make a .conf, with all of my jsons defined as strings inside
and load it as a resource
Trying to get loot spawner to spawn inside storage component, cannot find this example prefab anywhere in your mod. I tried on my own by taking the shipping container prefab, adding the SCR_Universalinventorystoragecompant to it, along with action manager so player can interact. I got the storage part working, being able to add and take items. I cannot figure out how to get the tiered loot spawner .et with my custom config to work with this, spawning the loot inside of the storage. I tried adding the spawner.et into the SCR_Universalinventorystoragecompant under 'initial storage slot' and no luck. Also tried adding the tieredspawner componant to the prefab and no luck. Any help would be much appreciated!
what is your goal? bundle a json file with your mod data and read it? but then why choose json. for configuration files .conf is the way to go. json only makes sense if loaded from external data sources
LOL
Anyway
I just need to dump the jsons into the server profile folder as templates for folks
conf wont work for my stuff since it has maps without keys known beforehand
and this 1999 software doesnt know how to represent them in attributes
yh you’re right, I remembered it incorrectly. I just checked and indeed I’m using SCR_JsonLoadContext
Its ok I figured it out thank u
Can i get **enum **name?
{
ONE, TWO,
}
...
PrintFormat("%1 %2", ETest.ONE, ETest.TWO);```
It prints numbers "0" and "1". How to make print "ONE" and "TWO" ? Is it possible without extra array with names?
try typename.EnumToString
It works ! Thx.
Hello, I play on a server where most of the players want 1st person when on foot and 3rd person when in a vehicle, however one of the Admins cannot play in 1st person as it makes them ill, is there a way to make it so admins can be 3rd person on foot, but the previous rules apply to everyone else?
Motion sickness sucks. Turning up the servers FOV and turning down his mouse movement speed should help. Other then that, I don't know of any mod. Although I have never looked.
You've been a bit silent recently 
He has motion sickness
Been playing ARMA and working on sorting out employment. Building code has me beat for now. Hoping 1.3 will drop so I can work on artillery.
Thanks for the reply, do you happen to know if it would be possible with a mod, like could it be done?
Yeah. Off hand. I don't see why you couldn't. Basically you would just whitelist a certain amount of people and allow them to have both first and third. And then the other s have the code applied that says "no third person for you"
Do we have a way to force 3rd person for when players are in a vehicle yet?
Hi, following problem: I have set a vector worldPosition inside a Config:
m_WorldLocation 1116.528 41.759 11682.838
If i now teleport a player to this location and debug the vector, the result is:
885.619995,18.094000,1483.889038
I do not understand why the vector is different?? The player always teleports into the ocean
@spring shale Is it possible to have a componentclass be replicated only on the server? im trying to implement code storage into a json file without having to use a basesystem.
What i should add in my code
so hint sent to every player on server?
I assume that it is some kind of RPL ?
bool KSHM_Destroyed=false;
void MCU_Trcuks_Trigger()
{
bool Truck0=false,Truck1=false,Truck2=false;
IEntity Target0 = GetGame().GetWorld().FindEntityByName("Target_0");
IEntity Target1 = GetGame().GetWorld().FindEntityByName("Target_1");
IEntity Target2 = GetGame().GetWorld().FindEntityByName("Target_2");
DamageManagerComponent Target0dmg = DamageManagerComponent.Cast(Target0.FindComponent(DamageManagerComponent));
DamageManagerComponent Target1dmg = DamageManagerComponent.Cast(Target1.FindComponent(DamageManagerComponent));
DamageManagerComponent Target2dmg = DamageManagerComponent.Cast(Target2.FindComponent(DamageManagerComponent));
if(KSHM_Destroyed==false && Target0dmg.GetHealth()<=0 && Target1dmg.GetHealth()<=0 && Target2dmg.GetHealth()<=0)
{
// Create the hint
string hintTitle = "Victory!";
string hintDescription = "All HQ Trucks has been destroyed!";
float duration = 10; // Duration in seconds
EHint type = EHint.UNDEFINED; // Hint type
bool isTimerVisible = true; // Show timer bar
EFieldManualEntryId fieldManualEntry = EFieldManualEntryId.NONE; // No field manual link
// Create the hint info
SCR_HintUIInfo hintInfo = SCR_HintUIInfo.CreateInfo(hintDescription, hintTitle, duration, type, fieldManualEntry, isTimerVisible);
// Show the hint
SCR_HintManagerComponent.ShowHint(hintInfo);
KSHM_Destroyed=true;
}
}```
also, how to simply reload world and restart current mission via code?
Lol this kinda looks like a job for a texture atlas
#restart
but in scripting command?
Look at the entity source for whatever game mode you're using, there should be methods related to starting and ending the match you can call from your scripts
How can I persist data across entities and have it modified by an attribute in the game master ui?
SCR_BaseGameMode.RestartSession();
Why are you doing this?
the atlas textures in Enfusion are the imagesets
I mean you could have a simple texture with 20 card variants and just change their UV
Essentially the same but less manageable and expensive as it comes from scripts
Also, you could just use a config as well (.conf)
Then you do not wreck moddability for whatever this is for
Just create an texture which is your image and apply it in your mesh 😄
You can maybe use the Refs in the material to change the BCRMap at runtime, but not sure if it is working correctly
Talking about Refs, how do you ref a vector4 for the color? 
what is a vector4
ikr
I thin it's actually regular ol vector because there is no alpha channel in materials in the colors
The alpha has a separate slider that would be a float
Is my best guess
Collimator component has color refs
Looks like vec4
Color_3 0 1 0.198 1
It works for collimators
So its vector
alpha is ignored
by shader
ok???
look
check this out
alpha do nothing
vector is fine
Yeah true

Now I just need to get it working 🙃
I used it before but my world crashes on load now, fun
Ok fixed, works with normal vector
awesome
Hi people ! I was oriented to this to get the speed signal from a wheeled vehicle, is there any equivalent for airspeed for an helicopter or is extrapolate from that same signal ? as I can't find any reference similar to GetAirspeed in VehicleHelicopterComponent
How does the character identity work exactly? Does it copy the mesh from the head and body identity prefab into its own mesh
or does it spawn the head and body identity prefab and uses that?
What's the most efficient way to move an already placed prefab? IE
IEntity obj3 = GetGame().GetWorld().FindEntityByName("obj3");
IEntity pole = GetGame().GetWorld().FindEntityByName("indrespawn");
vector newPos = obj3.GetOrigin();
pole.SetOrigin(newPos);
Are you going to be moving it 5 times per frame? If not dont worry about it
Nah I'm just updating a respawn location per objective destruction. In short we have a respawn system built that's based on a prefab location.
I just didnt know if SetOrigin() is correct in nature for it
It should work, if it has rpl component it should sync
use pole.Update() after SetOrigin, or u will have unexpected issues.
Based on the Advanced Replication Modding Boot Camp Video, am I right that the Limitations concerning RPC etc stated on https://community.bistudio.com/wiki/Arma_Reforger:Systems are not valid anymore?
Is it ok to put an Rpc method into ScriptedUserAction? Or does it have to be entity/component? Because i'm getting "Undefined function" error upon compile, while trying to follow scripting example from the wiki.
Yes
You can't
Thank you
Could someone help me with targeting the EntitySlotInfo with the ActionManager, Disabling and Enabling or using the Attach and Detach Function for a prefab
What is the best way to find the name of my mod via script? I'm looking for the ID found in addon.gproj.
With GameProject.GetAvailableAddons and the GetAddonTitle the mod is the first one, but is that always true?
U can get ID and title of addon by GUID .
...
GameProject.GetAddonID(MYTAG_ADDON_GUID );
GameProject.GetAddonTitle(MYTAG_ADDON_GUID );```
https://community.bistudio.com/wikidata/external-data/arma-reforger/EnfusionScriptAPIPublic/interfaceGameProject.html#ae6e688b06b65d106a3765f2492f63471
Thanks, that is correct. I'm trying to find the AddonTitle without knowing the GUID. As an example I have a function that prints out "Hello from %1", MyAddonTitle. It's used in various mods and I want each of them give me a "hello". I'm trying to find out which mod was the one sending the "hello". I want to avoid defining it in a variable beforehand.
It is possible for a component to be replicated only on the server? So that I can pass client data to it and have it sorted within this component?
Replication.IsServer() ?
His terminology is wrong. But he wants to have the data only exist on the server and have the data be populated by clients rpcing data to it.
Replication.IsServer() cut logic for server
protected void RpcBroad_SendData(int data)
``` send to players if need
He doesn't want to send the data to the clients
He wants to send data to the server from the clients, at least from what I got from his message.
?
yeah! youre right Zelik. Is there a way to do this? or would I need to deal with a system?
IIrc systems can only rpc data from server to clients and not the other way around. Unless it's been fixed in experimental.
also is playeridentity what I would want to use to log a players uniqueidentity? im assuming it is but ive heard various terms thrown around while searching discord.
ahh okay.
I want to send codes to the server side to store there from a usergui. I then will have another usergui that will attempt that code and make a request to the server side to verify the code. that way the user can never have access to the codes.
just deleted my whole project =(( i wish delete button would just place project to rec bin =(((((
basically controlling if a user has permission for an object or not. it would be nice to just have this info on every entity that its being used on. rather than calling to a system and writing the info to a json file. so if the entity is removed all the instance and data is removed in the process.
Not sure exactly what you're trying to limit the use of but, it sounds like your idea is gonna cause a bunch of network traffic.
limit the exposure of a code to an entity. it will only be sending traffic when its being claimed, locked and unlocked.
You definitely don't wanna be checking if every item in the game can be used by rpcing checks to the server.
no! it would only be sending that check when an object is having a useraction complete on it.
You're worried entirely too much about security for a game that is like 80% console players lol
aight lol, i didnt realize it was that many console players lol. Sorry, i just get ptsd from arma 3 days lol.
I guess I implement that if there was a need for it in the future.
A single boolean check is only a few bytes, broadcasting that unreliably wouldnt be an issue. Imagine how much data signals and stuff for vehicles and every item in your network bubble uses. Imo send it and see if it works
Although if the data is important non-trivial and gets sent only once (instead of e.g. regular overwriting updates), it should be broadcasted on reliable channel
You can just use a useraction. Those can be sent from client to server without needing to add another component. Then on server side do whatever you want, could be a system or not
would a component on the entity suffice? I would end up using the useraction to open a usermenu and the data would be sent from that user menu to server.
You can make an invisible user action that your visible user action triggers. Kinda weird to think about but I like to use it for client/server communication without an extra component. It just uses the actionperformer component that already exists on the character
But yes, if you want to do it with a component you can, itd be easier to think about
ahhh I see. okay ill much around with it.
Can you not material ref via custom entity on a character? Not sure if the body identity prefab is even spawned.
But I tried it on the body identity and on the char directly. Both dont change my color.
It kinda only works with a custom ChimeraCharacter but not with a SCR_ChimeraCharacter 
What do you mean by "not material ref"? Like "overriding" the material by changing the attribute on the mesh object?
#enfusion_scripting message The ref in materials to change it via code
https://vimeo.com/1066208456?share=copy It took longer to upload than it did to get working but, I assume this is what you're triyng to do?
This is "Material Ref Example" by Zelik O'Dyer on Vimeo, the home for high quality videos and the people who love them.
Custom body identity ?
This is "Material Ref Example - Custom Body" by Zelik O'Dyer on Vimeo, the home for high quality videos and the people who love them.
Luckily I just happen to have a custom everything lying around lol
Can you show the material file?
MatPBRSkinProfile : "{E96F2D55763F627D}Assets/Characters/Basebody/Data/Basebody_01_Male_Body.emat" {
TCModFuncs {
TCModShift "{64DF5477A8D7E09E}" {
ShiftU 0
Refs {
"ShiftU" "SCR_ChimeraCharacter.m_Value"
}
}
}
}
Hmm thats what I have but with color
Wdym with color?
Im using PBRMulti with Material 2 and 3
Refs {
"Color_3"
"SCR_ChimeraCharacter.m_vColor3"
}
Oh I see
It works on a normal entity but not char
Weird
Have you tried a component instead of an entity?
Not sure it will make a difference.
It has to be an entity no?
Hey guys! Does anyone know how to disable AI mortar HE rounds? If there is no option to choose, I want them to shoot smokes instead
Reforger Tools crashing everytime i try to script character movement (or use charactertrack event) is this a known issue and is there a workaround available? Thanks
Just disable he rounds in the entity catalog in the config file?
Btw did you only do this for the character material or on the identity body prefab?
They use the same material
class Class_A : ScriptComponent
{
protected override void OnPostInit(IEntity owner)
{
ref array<ref Class_B> someClassBs = SomeFunc();
// can access all Class_B's and their attributes here without problem -
// except for its foo attribute
}
ref array<ref Class_B> SomeFunc()
{
ref RefLosingClass embeds = new RefLosingClass();
ref array<ref Class_B> classBList = {};
for (whatever)
{
ref RefLosingClass refLosingClass = new RefLosingClass();
// fill refLosingClass with data
classBList.Insert(new Class_B(
refLosingClass // still has its data here
));
}
// refLosingClass is already null here even tho it has ref in Class_B
return classBList;
}
}
class Class_B
{
ref RefLosingClass foo;
void Class_B(RefLosingClass foo)
{
this.foo = foo;
}
}
Can someone explain to me why refLosingClass gets set to null after the for loop? i get that the local var loses scope, however Class_B should still hold a ref to it, right?
Which config file exactly?
I think because you are passing the reference and not the object, so as you said, it looses scope. try instead classBList.Insert(new Class_B(new refLosingClass))
sorry If my explanation is shit I'm not very smart ey
I'm at work right now, but exactly which ever faction you want to remove them from.
that works! ...but why?! and i must be able to pass the object without creating it in the parameters right?
i tried this before but that also didnt work. none of this makes sense to me :D
RefLosingClass refLosingClass = new RefLosingClass(); // no strong ref
classBList.Insert(new Class_B(
refLosingClass
));
Have you read this page? https://community.bistudio.com/wiki/Arma_Reforger:Scripting:_Automatic_Reference_Counting It explains better than I can
i have :D i get the concept of strong and weak refs, but it doesnt show my specific problem.
however i just realized that how you initialize the array seems to matter too for some reason?
ref array<ref Class_B> classBList = {}; // doesnt work, loses ref
ref array<ref Class_B> classBList = new array<ref Class_B>(); // works
the fist one should also just create a dynamic array https://community.bistudio.com/wiki/Arma_Reforger:Scripting:_Values#Array which should keep the value by reference.
also its not the "top layer" object that gets lost, Class_B objects get returned properly, its only the object inside that class that loses ref, so i understand even less how initializing that array changes behavior
You did all the ref usage wrong here
If you do the incorrect ones there, than you corrupt the VM at some point
Hey Mario, when in a localhost with peertool is the peertool identity shared with the main user or is it slightly different and unique?
@restive dust @sullen coral
@umbral merlin Also off topic for this channel
Hmm, im having an issue getting my menu to replicate properly. Should i be calling the menu from rpc?
{
if (m_lockManager)
{
CL_CodeLockClaimMenu codelockUI = CL_CodeLockClaimMenu.Cast(GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.CodeLockClaimMenu));
if (codelockUI)
{
codelockUI.SetTargetEntity(pOwnerEntity);
codelockUI.SetUserEntity(pUserEntity);
}
else
return;
}
else
return;
}```
!vertify
Depends on your whole logic.
Hi guys
I enjoy reforger, it reminds me of Private Armstrong and his journey on Everon in the original Oporation flashpoint before codemaster stole it.
hmm i think that is my issue. I should make my action localonly to avoid opening the menu for others. but I guess I need to rpc the menu to my component to get it to update.
Has anyone trained AI on Enfusion coding? I imagine that will be extremely helpful
closest thing it will understand is C#. Just as with SQF, enfusion is such small languagesthat:
1.) Sample size is too small to learn
2.) The samples that are there, are mostly the community's code, which may not be the optimal way of doing it (sometimes even very sub optimal)
just learn C# and you'll be good to learn HOW to read the dev code to know how everything works. AI will not fix overarching program design.
language models only work well with sqf because of all the open web sqf problem solving and forums.
discord is a black hole of information, so enfusion stuff is not gonna catch up, also because the threading structure is bad in discord.
Even if you download the #enfusion_scripting channel, it's wrose by default compared to sqf resources
But you can get c# basics from text generators
Is there a way to Get the closest 'town/POI' (Anything from the map really) by script? I want to Display a notification with the closest data
Similar to how the Vanilla map in conflict tells you "You are nearby: ...."
I disagree about SQF. its really not good at SQF. the pool of crappy code vastly outweighs good code for it to learn on. I actually had to take a step away from helping the A3 community as much because the amount of questions involving fixing AI outputs was getting too cumbersome.
fair
best resources for enfusion coding is the script editor and the vanilla enfusion code
When running BaseRadioComponent.SetPower() from an Action with HasLocalEffectOnlyScript set to false, it crashes the workbench (when testing with peer tool) with no errors.
The BaseRadioComponent is a child of a vehicle that the player is in, so I guess the player is the owner of the vehicle?
Bug or a feature?
Setting the frequency on a transceiver the same way does not crash so this is only to do with the BaseRadioComponent.SetPower()
Any Bohemia dev can objectively confirm wether the Map tool for drawing lines that is only available in singlplayer currently is that moddable to be shown multiplayer?
What's component invoke SCR_RespawnSystemComponent.OnInit(owner). Cannot find, but when i create custom scr extended by RespawnSystemComponent onInit not invokable... :/ Manually only. Sorry for my eng*
it would help if you shared a code snippet so i can tell you what is wrong
I don't understand what exactly calls this function...
But in default component, some like SCR_BaseGameMode is working cool*.
first you should also be calling super when overriding this there. Second you need to make the world setup your inherited respawn system. so you need to change the gamemode entity setup in your world. it is probably still using the vanilla one
Thanks super is working, thx )
But 1 more question, can i create custom event method and execute? Im read earlier about scriptInvoker, but not info about event type word. (Maybe I didn't see something)
Thank you very much...😅
event keyword is used exclusively by c++ gamemode sending events to script. for you to know about that they come from there and forcing them to not be overloaded. you must not care about them. if you want to do some reactive events and trigger them, script invoker is your way to go
@torn bane So did I understand correctly that if I want to, for example, create onInit, which should be called when an instance is created... I can't do this unless I write an external control technology (script)?
And so sorry, what is _WB_OnInit, can i use that? (GenericComponent)
//! Called always after entity creation. It's purpose is to prepare entity for editing. Do not edit anything through editor API here because it's too early for undoable actions! Use plain BaseContainer API for changes through src parameter if needed!
Description about WB
those are events for workbench plugins and scripts. they are not firing in normale game. hence the wb prefix
event keyword does not really mean that the method is an event, it is just a method modifier to specify certain behavior in engine
For example making the method show in the scripts group in a named entity
That also poses some limitations like arkensor said that it blocks overloading.
You can make a custom method that you just made from scripts have the event keyword and it will expose them just the same as I described.
So, do not use the event keyword as reference for methods that are used as events 🙂
Thank you very much
Thank's )
This will remove HE for the whole faction, I want to remove HE for AI troops
[Rplprop()] doesnt need parameters technically? it should update when replication.bumpme() is called?
I might have to watch the bootcamp video, I read the wiki and sorta am gettin the info but replication seems so confusing with the terminology.
Not sure whether the engine has a default fallback in place e.g. in case of not providing the condition field. Like if you don't provide the condition, how would the engine know what to do?
It will work
The params in there are all conditional
What would the condition be if it isn't specified? RplCondition.None?
When creating files (.conf, for instance) in the $profile folder, if I only want to create it in the server's profile, do I need to check if it's a server first? Or does it do that already?
If needed, then how to do so?
Like, for clarification, I don't want the files to be created in any player's profile folder as well
Yes, it works the exact same way as everything else.
If you want to only do it on server you must make sure you're only doing it on the server.
This is due to one of my methods with an Rpc that has method parameters? i dont have any other errors now so im lost.
Scripts/Game/Map/Markers/Objects/SCR_MapMarkerBase.c(3): error: Constructor of type `IEntity` must not have any parameters when used in RPCs or replicated properties. Scripts/Game/Map/Markers/Objects/SCR_MapMarkerBase.c(3): error: Method `IEntity.Encode` is missing. Scripts/Game/Map/Markers/Objects/SCR_MapMarkerBase.c(3): error: Method `IEntity.Decode` is missing. Scripts/Game/Map/Markers/Objects/SCR_MapMarkerBase.c(3): error: Method `IEntity.SnapCompare` is missing. Scripts/Game/Map/Markers/Objects/SCR_MapMarkerBase.c(3): error: Method `IEntity.PropCompare` is missing. Scripts/Game/Map/Markers/Objects/SCR_MapMarkerBase.c(3): error: Method `IEntity.Extract` is missing. Scripts/Game/Map/Markers/Objects/SCR_MapMarkerBase.c(3): error: Method `IEntity.Inject` is missing. Scripts/Game/Map/Markers/Objects/SCR_MapMarkerBase.c(3): error: Type `IEntity` cannot be replicated due to previous errors.
You can't pass entities as params for rpc calls
ahh okay, hmm. Is there a better way to do this?
{
protected CL_CodeLockManagerComponent m_lockManager;
protected DoorComponent doorComp;
protected IEntity UserEntity;
protected IEntity OwnerEntity;
override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
{
m_lockManager = CL_CodeLockManagerComponent.Cast(pOwnerEntity.FindComponent(CL_CodeLockManagerComponent));
doorComp = DoorComponent.Cast(pOwnerEntity.FindComponent(DoorComponent));
}
//------------------------------------------------------------------------------------------------
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
{
if (!m_lockManager || !pOwnerEntity || !pUserEntity)
return;
OwnerEntity = pOwnerEntity;
UserEntity = pUserEntity;
if (!Replication.IsServer())
{
RPC_RequestAttachCodeLock();
return;
}
}
[RplRpc(RplChannel.Reliable, RplRcver.Server)]
void RPC_RequestAttachCodeLock()
{
if (!m_lockManager || !OwnerEntity || !UserEntity)
return;
if (Replication.IsClient())
{
CL_CodeLockClaimMenu codelockUI = CL_CodeLockClaimMenu.Cast(GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.CodeLockClaimMenu));
if (codelockUI)
{
codelockUI.SetTargetEntity(OwnerEntity);
codelockUI.SetUserEntity(UserEntity);
}
}
}
override bool CanBeShownScript(IEntity user)
{
if (m_lockManager.GetLockAttached())
{
return false;
}
else
{
return true;
}
}
override bool CanBePerformedScript(IEntity user)
{
if (m_lockManager.GetLockAttached())
return false;
else
return true;
}
override bool GetActionNameScript(out string outName)
{
if (doorComp)
outName = "Attach codelock to Door";
else
outName = "Attach codelock";
return true;
}
}
I had this working before, but when I introduced a menu UI, the replication wasnt there.
class CL_CodeLockClaimUserAction : ScriptedUserAction
{
protected CL_CodeLockManagerComponent m_lockManager;
protected DoorComponent m_DoorComponent;
//------------------------------------------------------------------------------------------------
override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
{
m_lockManager = CL_CodeLockManagerComponent.Cast(pOwnerEntity.FindComponent(CL_CodeLockManagerComponent));
m_DoorComponent = DoorComponent.Cast(pOwnerEntity.FindComponent(DoorComponent));
}
//------------------------------------------------------------------------------------------------
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
{
if (!m_lockManager)
return;
if(SCR_PlayerController.GetLocalControlledEntity() == pUserEntity)
{
CL_CodeLockClaimMenu codelockUI = CL_CodeLockClaimMenu.Cast(GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.CodeLockClaimMenu));
codelockUI.SetTargetEntity(pOwnerEntity);
codelockUI.SetUserEntity(pUserEntity);
}
}
}
ahh okay, i thought about that part before but for some reason my mind just ignored it. that basically localizes the ui menu onto only the user?
local action only? is there any downsides to doing that if the menu is only meant to be visble to that player?
class CL_CodeLockClaimUserAction : ScriptedUserAction
{
protected CL_CodeLockManagerComponent m_lockManager;
protected DoorComponent m_DoorComponent;
//------------------------------------------------------------------------------------------------
override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
{
m_lockManager = CL_CodeLockManagerComponent.Cast(pOwnerEntity.FindComponent(CL_CodeLockManagerComponent));
m_DoorComponent = DoorComponent.Cast(pOwnerEntity.FindComponent(DoorComponent));
}
//------------------------------------------------------------------------------------------------
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
{
if (!m_lockManager)
return;
CL_CodeLockClaimMenu codelockUI = CL_CodeLockClaimMenu.Cast(GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.CodeLockClaimMenu));
codelockUI.SetTargetEntity(pOwnerEntity);
codelockUI.SetUserEntity(pUserEntity);
}
//------------------------------------------------------------------------------------------------
override bool HasLocalEffectOnlyScript()
{
return true;
};
//------------------------------------------------------------------------------------------------
}
Menus are only local anyway
There can be data that is replicated making them look the same for everyone
ahh okay ill just do that.
but there isn't shared menus
each menu is its own instanced, im assuming what you are getting at.
And the server doesn't open menus, unless you're hosting and you're the sever and a client
ahh okay.
Not only are menus instanced(like everything else) but they are only local
ahh. so to have that menu send data out, you would need to use an rpc to the authority to request the info be changed? i dont know if my terminology is right.
Take this useraction and change HasLocalEffectOnlyScript to false and run it in workbench with a few peers connected and see what happens lol
yeah i did that before lol
I turned it off not realizing that the reason the peer wasnt updating the component was because of replication. as im assuming my character is the authority?? since its hosting the server hmm.
Is there anyway to troubleshoot RplSchedulerErrors? We get dummy spammed with them and I'm unsure where to start trying to troubleshoot/fix it
I've never even see RplSchedulerErrors before
Be aware that you can't send rpcs from things you don't own
There should be nothing Rpc related in user actions
They don't even have the Rpc function.
example:
Rpc(Ask_Authority_Method,param);
Additionally, when it comes to creating .conf files in the profile folder, how can I read it from script?
This is what I currently have:
string m_sDb = string.Format("%1/%2", DB_DIR, DB_NAME_CONF);
if (!FileIO.FileExists(m_sDb))
{
CreateConfig();
}
else
{
Resource holder = BaseContainerTools.LoadContainer(m_sDb);
m_randomizedConfig = CONVICT_RandomizedAIInventoryConfig.Cast(BaseContainerTools.CreateInstanceFromContainer(SCR_ConfigHelper.GetBaseContainerByPath(holder)));
if (!m_randomizedConfig || !m_randomizedConfig.m_RandomizedItemData)
{
Print("[CONVICT] CONVICT_RandomizedAIInventory.conf can not be found! This is typically located in your server's profile folder, please resolve!", LogLevel.ERROR);
return;
}
}
``` which prints the error, and I assume because my .conf doesn't have a GUID attached to it. So what would I need to do instead, if possible?
manually create a meta file when the conf is created on the server
Are you expecting people to create this config or is it gonna be supplied?
hey! somebody know how to add an arsenal to a object like a safe? :) thx in advance. :) greets!
What?
The initial file creation is supplied, then people will add to it
also, how to do the meta file creation? 
So you're gonna supply the file pre-created?
If so just supply the meta file too
Otherwise you have to create one at runtime
From scratch
All of that is only handled in workbench.
There aren't any functions to crate meta files at runtime, that's done by the resource manager or whatever it's called and it can only be done in workbench.
Ohhhhh okay, I think I see. So basically, I have it setup to create the file at runtime, but then it's up to the server owner to register it through Workbench?
If so, that's fine. The goal was for them to basically run server once, which then creates the files, then they stop the server and edit what is needed in the file
It's easier to just use a json file
Oh it is, but .conf seems to be more beginner friendly when editing in Workbench, I think at least
Sure, conf files are easy to edit because they have a ui in workbench
You should just supply a conf in the mod and allow people to override it.
Only reason I don't do it that way is because then you have to have a whole other mod just to override it, which seems unnecessary
Most communities and people hosting servers have the own mods to begin with.
What about the server providers that don't give much access to files.
That stops your flow dead in its tracks.
If they have limited access to altering files on the server they're renting, then what happens?
Same limitation would happen with local json files as well though.
That's why its best to just supply a conf in the mod and allow overriding of it.
I would hope a server provider allows access to the profile folder lol, seems like such a basic needed feature for a server host
I get your point though
I'm pretty sure file restriction is why people hate Nitrado.
Dont worry about that, it will motivate people to find a provider that respects their users
So it is net positive
RIP nitradont
There are providers that dont allow server to download mods from workshop, and require you to upload them via FTP.
There are providers that dont allow editing files that aren't server config json.
There are providers that dont let people change scenarios beyond conflict (yes, really).
There are providers that dont let users use RCON.
Dont let any of this stop you.
This approach is less user friendly than just creating a mod for your server and overriding a conf file. You're having your end user do the samething with more steps lol
RIP half of the playerbase not being able to use your mod since they dont have a PC
That too ^
If you only allow it through creating a mod, they're required to have a pc
Server conf, is the best way but, not necessarily the most user friendly
Realistically it's the only choice
And their server provider could halt that process in it's tracks.
Good, less business for providers that don't respect their customers
If people are expected to then open the conf in workbench and edit it though, they're kinda required to have a pc in the first place.
Might as well just use a json file.
Yeah json wins. Editing those on a smartphone is hell, but at least it's possible for those that don't have a PC.
A lot of folks also have a PC but play Reforger on console only.
His whole point of using confs was ease of access.
But editing them via text editor is basically the same as editing a json file via text editor.
in that regard json wins because it's the same format they edit in other places ie. server config
A lot also has to do with what is stored in the conf/json to begin with though.
How are people expected to know the ResourceName of the item that they're wanting to add to the conf/json?
They have to have a pc and workbench in that case.
Which would make creating a mod and overriding the conf the best way, regardless.
i mean how to add a arsenal to an object? :)
..to an object like this :)
Ask in a more relevant channel. That has nothing to do with scripting.
SCR_ArsenalComponent
SCR_ArsenalInventoryStorageManagerComponent
And yes. This is not scripting question 🙂
Or just inherit from the prefab you want and change the mesh
alright and thx a lot ya!! 🙌
I don't like doing that unless it's my only option. Even having a PC, if there's a json I can edit, I'd opt for that any day over creating another mod.
But in most cases communities have their own mod.
The only foolproof way is to make a mod that overrides the config file. Every other way could have issues that restrict it.
Personally, I hate dependencies, so I dont like having a "server mod" that has a long list of dependency mods that Im editing. Cuz if one dependency goes down, I have to go and publish an update to get things working again. I prefer to make "fix" or "edit" mods for each individual mod, so if the mod goes down I can easily just edit my mod list to get it working again.
Most people aren't you lol. Most communities have a server mod that has a shit ton of dependencies.
If they're gonna have to boot up workbench to edit the conf, or to look up ResourceNames then they might as well add one more dependency and override a conf file lol
Hey I have a question if i have a custom SCR_chimeracharacter script how can i set that up to work with a character prefab? like if i had a post frame script that altered size?
if my useraction has logic in the CanBeShown(). is there any point of having the same logic in CanBePerformed()?
Altering the scale of characters isn't supported and hasn't been for awhile.
You can probably still do it but you're gonna have undesired results.
No just have CanBePerformed return CanBeShown
And you don't even really need to do that
ahh good call. Hmm okay. because if its not shown its not even possible to attempt to perform hey
CanBePerformed can't actually be performed if the actions isn't shown
Both of which are called on frame when looking at the "context" of the action
ahh so logically it probably makes most sense to just have it only true to avoid it running additional logic.
so CanBePerformed can always return true,
yes
then CanBeShown will show it and people can perform the action
if CanBeShown returns false, it won't be shown for the player to perform anyway
Can I dm you a few of my scripts
Bacon was able to figure it out with post frame scripting I’m just sort of figuring out how to set it up regardless of the hoops I suppose
Altering scale from animations maybe?
hmm I didn't see the source on that, is that a mod yet?
It’s wip still I think
Hey @ocean kernel bacon, I dmed you about some scripting stuff. Me and you talked way back in alpha (end of 22) when you helped me get started and I wanted your input on a few things with regards to scripting and mod production. Just reaching out through here to make sure you take a look at the DM, as it offers an interesting proposition. Also the answer is "most likely" to a question you posed to me back then. Based on the experience ive had since.
Can someone link me or show me basic replication for using a uimenu to send values to a component and have it replicated? its working on my main client but still wont on my peer client. causing me grief.
right mouse click on prefab > override > right mouse click on overdried prefab > edit prefab > right mouse click on prefab class (right top corner where is SCR_ChimeraCharacter) > change class > select own class > save prefab
It works the exact same way as described here except the values come from a menu, go to a component then get rpcd
Character clicks a button in the menu, the menu changes a value in the component, the component then asks the server something based on the value that was changed.
How far in prefab hierarchy this component is defined or something similar
Thx ) got it
I understand that it’s probably my fault, but maybe someone has encountered a similar problem.
What I did -> Pulled out DefaultPlayerControllerMP, simplified the components, but! - everything related to UI, especially HudManager, was moved entirely...
In the default prefab has effect in ScreenEffect's i have one too
WORLD : UpdateEntities
WORLD : PostFrame
SCRIPT (E): No Slot Widget for Layer Slot:
SCRIPT (E): Virtual Machine Exception
Reason: NULL pointer to instance. Variable 'm_wRoot'
Class: 'SCR_BleedingScreenEffect'
Function: 'AdaptiveOpacity_Initialize'
Stack trace:
Scripts/Game/UI/HUD/SCR_InfoDisplay.c:455 Function AdaptiveOpacity_Initialize
Scripts/Game/UI/HUD/SCR_InfoDisplay.c:432 Function OnStartDraw
Scripts/Game/UI/HUD/SCR_InfoDisplayExtended.c:231 Function OnStartDraw
SCRIPT (E): Virtual Machine Exception
Reason: NULL pointer to instance. Variable 'm_wRoot'
Class: 'SCR_BleedingScreenEffect'
Function: 'AdaptiveOpacity_Initialize'
Stack trace:
Scripts/Game/UI/HUD/SCR_InfoDisplay.c:455 Function AdaptiveOpacity_Initialize
Scripts/Game/UI/HUD/SCR_InfoDisplay.c:432 Function OnStartDraw
Scripts/Game/UI/HUD/SCR_InfoDisplayExtended.c:231 Function OnStartDraw
SCRIPT (E): 'SCR_PlayerTeleportFeedbackUIComponent' could not find 'SCR_PlayerTeleportedFeedbackComponent', make sure it is added to the player controller
Resolve -> "Copy" sometimes doesn't work correctly. Param LayerName was empty in default handler
afternoon guys, anyone got any idea where i would start with creating a range finder (Scope & Handeld)
How can i reset eventhandler usage on entity?
When i kill vehicle by Zeus lightning the destroyed vehicle runs OnDestroyed eventhandler and all ok, but
when i use RPG, the eventhandler called on windows or lights. I repair vehicle and use again but no eventhandler anymore.... When i destroy vehicle totally later no called OnDestroyed eventhandler.
In OnDestroyed eventhandler description:
"when the default hit zone is set to destroyed"
the default hitzone is "HULL" on vehicle, why eventhandler run on vehicle parts like windows not on main entity and why run only once in entity lifetime?
ah found it sry
when register the eventhandler i used single use true
(i don't thinked its running on all parts if i register only the main vehicle ent)
and it runs only the first destroyed part
so if i need use on destroyed event on main vehicle i need cast "ent" to "vehicle" (to skip other parts)
What would be the ideal/correct way to get the playerId in this case?
modded class SCR_PlayerXPHandlerComponent : ScriptComponent
{
override void OnPlayerKilled()
{
super.OnPlayerKilled();
TEST_GUI_Settings GUI_Settings = TEST_GUI_Settings.GetInstance();
PlayerManager playerManager = GetGame().GetPlayerManager();
int playerId = playerManager.GetPlayerIdFromControlledEntity(GetOwner());
SCR_PlayerController playerController = SCR_PlayerController.Cast(playerManager.GetPlayerController(playerId));
GUI_Settings.GiveToOtherVoid(playerId);
}
}
protected static ref set<int> s_iSomeSet = new set<int>;```
I'm trying to RplProp a set, but it doesn't work, while bool propetry just next to it getting Rpl.Bump()ed no issue. Or am i doing some sort of blasphemy with this?
array doesn't work either
ok, so i guess it is a blasphemy, as non-static array works
Is there any reason why you should not mod SCR_ChimeraCharacter? Or is it fine?
Idk I do it fine
great, thanks
is there a way to spoof identityid on peertool?
just realized that may be why my testing hasnt been working because the peertool has no identityid i guess??
You could install the hacks that people use with steam
But then you risk being part of the botnet
yikes lol
In server admin tools v2 I have a helper method to fetch identity id where I substitute with a string if the game runs in dev environment
i was hoping there was a workbench work around to get the peertool to have an id because when i print its ID it loads in with null id or empty i think.
if im in workbench does #ifdef workbench work across all?
static string GetPlayerIdentityId(int playerId) {
#ifdef WORKBENCH
return string.Format("dev-playerid-%1", playerId);
#endif
BackendApi api = GetGame().GetBackendApi();
if (!api) {
Print("ServerAdminTools_Util.GetPlayerIdentityId | Failed to get Backend API!", LogLevel.ERROR);
return "";
}
string identity = api.GetPlayerIdentityId(playerId);
if (identity.IsEmpty()) {
Print("ServerAdminTools_Util.GetPlayerIdentityId | Empty Identity ID obtained from Backend API", LogLevel.ERROR);
}
return identity;
}
ahh okay thats how i was about to do it!
I need it as a lot of my mod depends on identity id 😄
yeah, its too bad there wasnt a built in peertool option to have an ID. I dont think it would be abuseable because peer tool runs on a development build right?
Sometimes you do want things to fail if there is no backend, though
this whole time im trying to troubleshoot my peer tool not registering and it was basically sending a null ID lol.
i have it checking backend too in my script. for some reason last night i had a weird loop happening.
Ive had a few weird things happening when I have restarted workbench for a while. need to remember to do that before i start messing with stuff.
no, as peer tools do not know they are used in workbench. they will compile as normal clients
ahh i see what you did with your script too. I like that. if in workbench it will always have a mock id regardless.
if I dont have an rplprop on a variable. that variable wont get replicated to clients right, it will stay server side?
Yes
Where is the function which is executed when someones fire a weapon
I want to draw a line between the start pos of the bullet and the end pos of it
don't know if that's related but sometimes when i launch world editor and/or script editor very quickly after launching wb it gets stuck forever trying to link profile, so backend is unaccessible
is this normal to see in log console when a peer tool is connecting?
WORLD : UpdateEntities
NETWORK (E): Trying to register connection of possibly unauthorized client.```
Almost sure i saw someone here said yes, it's normal
im assuming so but just wasnt sure.
is it possible to obtain typename from string? preferably with some check whether the typename is valid (defined)
string::ToType()
lol, such an obvious answer. gracias!
You know you can find methods for classes if you use find symbol?
yeah, but I searched for toTypename
To be fair, to type name would return "string"
it would be incosistent, the class is typename. tho the class should be type, and typename should be a typedef for string
actually, string-inherited class, not a typedef. just like we have Resource and ResourceName
Shoulda, Coulda, Woulda
is there a custom param to have peer tool be in debug or workbench so it runs the workbench or debug ifdef properly?
Peers will never run "workbench code"
My issue while testing is that my peer connects. it doesnt have an identity so it returns null. Wasnt sure if there was a good work around for this.
Getting the playeruid will only happen on the server
In your case that's workbench
Bacon has literally given you a way to fix that issue, why are you not using it?
i did lol
unless like you said its not working as its being called client side rather than server.
ahh one sec.
how do I give ownership to a proxy? thats my issue i think. client is only proxy. so trying to call this code gets dropped.
Hello, I'm new to Arma reforger, so to speak, and I've just started to figure it out.
I couldn't find any answers to these questions on the Internet:
- How to implement subtitles in a Scenario (screenshot 1)
- How to implement hints (screenshots 2)
- Is it possible to insert custom music and character voice acting, as in Arma 3?
Thanks for attention.
I don't think any of that is related to scripting and is all set up in components
do i have to have a scriptinvoker or something for the server to watch for to give ownership of the component to whoever opens this menu? i cant seem to figure it out.
Uh, the server should be the one that is giving the ownership of the component to the character that opens the menu
iirc at least. Pretty sure the client can't give something to itself
What's the proper way to check if youre the server? Searching through the Discord and vanilla script, I see that Replication::IsServer() is better off avoided, so what's another way?
RplSession::Mode(RplMode.Dedicated) perhaps?
If you want to check if server then use IsServer
Ah, so it's fine to use?
Yes as long as you specifically want to check if it's server, sometimes people may want to check if owner or if authority
Ah gotcha gotcha, yeah, in my case just checking if it's server to create a file, and to not create it if on client
Yeah from what I read a client can’t give itself ownership. So I guess something with an invoker would be the best approach? I’m not even sure how I would give ownership because I can’t request it from the menu technically. But I need to give it to the player temporarily when calling a command
I thought I was understanding reforger the best I could then replication came upon me and I’m sorta lost again. I understand the terminology well almost fully.
Not sure why you think you need a script invoker
I don’t know honestly. Well I guess I could have the rplprop watch a method and if it returns true it will give ownership? Because it would be the server doing that not a player requesting it?
You're using a user action to show the menu
Yeah
Ahh okay. I’ll do that when I get home.
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
{
if(Replication.IsServer())// Create a static function that can be called by the server, with an input for the "Item" and "New Owner"
//Give Ownership of pOwnerEntity to pUserEntity
//Just for Conformation, No need to check other proxies
if(SCR_PlayerController.GetLocalControlledEntity() != pUserEntity)
return;
GetGame().GetCallqueue().Call(ExampleFunc,pOwnerEntity); //Call a frame later
}
void ExampleFunc(IEntity thing) //Will print if the caller of the function is the owner of the thing or not
{
RplComponent Comp = RplComponent.Cast(thing.FindComponent(RplComponent));
Print(Comp.IsOwner().ToString());
}
is there a way to get an array of all the layer paths currently in the world directory?
static array<string> GetAllLayerAbsolutePaths(string worldPath, string worldName)
{
array<string> paths = {};
string defaultLayerAbsFilePath;
if (!Workbench.GetAbsolutePath(worldPath, defaultLayerAbsFilePath))
{
Print("Could not get absolute path for " + worldPath, LogLevel.WARNING);
return new array<string>();
}
// something to grab all absolute paths here
return paths;
}
@spring shale Apologies for the ping, but I've seen some messages from you in here about tackling this issue and thought you might be good to ask.
I'm trying to attach a camera to the player using addchild, however the offset is never correct.
Here is my code snippet, do you have any suggestions?
_unit.AddChild(entity,_unit.GetBoneIndex("Head"));
vector transform[4];
transform[3] = "0 0 0";
entity.SetLocalTransform(transform);
entity.Update();
-edit SOLUTION:
This happens because of the "[ABOVE_TERRAIN] TerrainCollision" component that is on the camera. My solution is to duplicate one of the existing cameras and then disable this component. This makes the camera be placed at the correct position when using AddChild
Figured out a solution:
protected string GetLayersAbsoluteFilePath(string worldPath, string worldName)
{
string worldAbsPath;
if (!Workbench.GetAbsolutePath(worldPath, worldAbsPath))
return;
string layerAbsDir = FilePath.StripFileName(worldAbsPath);
if (!layerAbsDir.EndsWith("/"))
layerAbsDir += "/";
return layerAbsDir + string.Format("%1_Layers", worldName) + "/";
}
WorldEditorAPI worldEditorAPI = SCR_WorldEditorToolHelper.GetWorldEditorAPI();
if !(worldEditorAPI)
return;
string worldPath;
worldEditorAIP.GetWorldPath(worldPath);
string worldName = FilePath.StripExtension(FilePath.StripPath(worldPath));
string layerFolderPath = GetLayersAbsoluteFilePath(worldPath, worldName);
array<string> paths = {};
FileIO.FindFiles(paths.insert, layerFolderPath, ".layer");
// test
foreach (string path : paths)
{
Print(path);
}
can I have an array as a value in a map?
Yes
How i can give a player control over entity. ?
If by control you mean ownership then m_RplComponent.Give(playerRplID);
having issue giving ownership still
RPL : rpl::Pip::ProcessNetToGame
RPL (E): ReplicationError: Give called for identity which is not ready for replication! ident = 2147484207```
Hey all, what would be the best way to get custom code executed when mortar shell explodes? Is it custom projectile effect? I'm trying to set up a mortar training gamemode and use this code for hit detection/accuracy measurements.
Maybe in the warhead
Any clue why an identity wouldnt be ready for replication?
No I dont know what that means sorry
The rpl component is probably not set up correctly.
Could it being a child object have anything to do with it?
Idk
I've never tired to give ownership of a "child object" to a player before
like i dont think it should matter right. because im giving ownership from the rplcomponent on that object regardless.
Thinking it doesn't matter and it actually mattering are two different things.
yeah i know.
If you wanna know for sure then test it and find out.
well i tried getting the root parent and getting the rplcomponent from that but it still failed.
Change the state override to runtime Doesn't matter for setting ownership it seems.
NETWORK (E): Trying to register connection of possibly unauthorized client.
WORLD : UpdateEntities
RPL : rpl::Pip::ProcessNetToGame
RPL (E): IReplication::JIPError: Inconsistent item table on Slave connection. Item is missing or different item was loaded in its place. (item=0x40000068 layout=script::Game::SCR_SpawnPoint con=0x0)
RPL (E): IReplication::JIPError: Inconsistent item table on Slave connection. Item is missing or different item was loaded in its place. (item=0x40000069 layout=script::Game::SCR_EditableSpawnPointComponent con=0x0)
RPL (E): IReplication::JIPError: Inconsistent item table on Slave connection. Item is missing or different item was loaded in its place. (item=0x4000006A layout=script::Game::SCR_FactionAffiliationComponent con=0x0)
RPL (E): IReplication::JIPError: Inconsistent item table on Slave connection. Item is missing or different item was loaded in its place. (item=0x4000006B layout=script::Game::SCR_ResourceComponent con=0x0)
WORLD : UpdateEntities
RPL : rpl::Pip::ProcessNetToGame
RPL (E): IReplication::JIPError: Terminating connection. (identity=0x00000000)```
peertool crashed.
JIP error
Join in progress error
I've literally never done anything that causes that.
Not sure what you've done
well i deleted some code that wasnt needed and i dont have JIP error now while in rpl state override: runtime. but my useractions dont work on the door.
using / to comment lines in exp editor borked?
It only works with multiple lines selected.
Not for me it dont
// for one line
/* for
multiple
lines
*/

where have u been all this time

