#enfusion_scripting
1 messages · Page 26 of 1
How are you handling not showing in vicinity?
has anyone successfully replicated attaching something to a slot of a vehicle on a dedicated server?
in a modded class of SCR_UniversalInventoryStorageComponent
override bool ShouldHideInVicinity()
{
CONVICT_BuriableComponent buriableComp = CONVICT_BuriableComponent.Cast(GetOwner().FindComponent(CONVICT_BuriableComponent));
if (buriableComp)
return buriableComp.IsBuried(); // if item is buried, don't show in vicinity
}
ive gotten as far as attaching something but it doesnt actually attach until i go outside of render range and come back
even with bump.me
are you updating the entity? IEntity.Update()?
thank you.... ill try that lol
use canbeshown or canbeperformed (for the user action)
InventoryItemComponent:HideOwner();
InventoryItemComponent:.RequestUserLock(pOwnerEntity, true);
InventoryItemComponent:DisablePhysics();
modded class SCR_UniversalInventoryStorageComponent
{
override bool ShouldHideInVicinity()
{
return IsUserLocked();
}
}
event bool CanBePerformedScript(IEntity user) { return true; };
//! Can this entity be shown in the UI by the provided user entity?
event bool CanBeShownScript(IEntity user) { return true; };```
located in ScriptedUserAction.c
wouldn't user locking block all actions?
you would put that in a modded user action or your own user action
it should only effect the action you put it in
issue with this is I'd have to put it in every user action to I want to be effected (which is all of them), so not viable solution as it wouldn't account for potential modded actions. If I could mod ScriptedUserAction, then the solution would be simpler
yeah if you modded the scripteduseraction it should apply for every action
it's a generated class, so it can't be modded
I appreciate it, but unfortunately it doesn't apply to what I'm needing to do
so you have a box that you want to shut off the actions to when some variable is met?
is that the gist of it?
delete the box and spawn a placeholder with no actions?
\or move it to the sky somewhere
Not an option, it has a storage to it. Currently it changes the mesh to a "buried" mesh, and is supposed to disable all actions but the unbury one. Then when unburied, it reenables the actions and changes the mesh back
you should be able to do that with canbeshown using a boolian for buried
and you would only have to put it in the bury and unbury actions
why dont you just transform the entity underneath the terrain?
yeah, that part is fine. The bury/unbury actions are setup and they work fine. The part I'm having issue with is the disabling of all the actions the buriable entity can perform (ones that are not the bury/unbury actions). But since it's a universal component to be potentially added to any entity, I need a catch all solution to disable the other actions.
The disabling of actions work fine in workbench, I was originally just confused why it wasn't working on peer even though I RPC'd it to the server
ah yes you would have to add it to every action =\
canbeshown can only be called inside the action im pretty sure
Is there a way to get player IP and BE GUID in a script and log it?
what's the reason for player IPs? 
Temp banning IPs due to prevent ban evasion
Its in logs, but all the relevant info is split between different lines and I would like to log it all it once in a custom log for easier processing
What were you worried that I might use it for?
Also where is the class/functionality for custom rcon commands?
could've been doing bad things. But either way, no, probably not a way to get player IP through script, at least not from a quick symbol search
Gotta have the server manually parse the log file.
have an ai make u a python program that watches the logs and puts all names\ip's in a file
could then make a discord bot that watches the end file and sends it to a discord channel
and flags matching ip's
so for an update to this: From testing, I believe the method SetActionEnabled_S() is borked and doesn't replicate properly like it should. It doesn't disable the actions for those who have the entity streamed in initially, but does disable the actions for those who don't have it streamed in initially
and searching through feedback, looks like I'm not the only one who has noticed this https://feedback.bistudio.com/T196178
U can
Anyone know how to disable a vehicle in the Conflict vehicle spawners? Sort of like when they're on cooldown
It’s definitely in some component inside the vehicle itself or there might be a more general setting in the conflict config
Not sure though
Should be SCR_CatalogEntitySpawnerComponent or SCR_VehicleSpawner
One question: can't the server change the player's position?
I tried to change a player's position using SetOrigin from the server, but it doesn't work.
Yes I misread that.
Something like this
[RplRpc(RplChannel.Reliable, RplRcver.Server)]
protected void RPC_TeleportPlayer(int targetId, vector position)
{
IEntity player = SCR_PossessingManagerComponent.GetPlayerMainEntity(targetId);
if (!player)
return;
SCR_EditableEntityComponent editableComp = SCR_EditableEntityComponent.Cast(player.FindComponent(SCR_EditableEntityComponent));
if (!editableComp)
return;
vector transform[4];
player.GetTransform(transform);
transform[3] = position;
editableComp.SetTransform(transform, true);
}
Actually check SCR_EditableEntityComponent::SetTransform usages
😁
I am already writing my own log parser. Im old school. No vibes here ✌️
(not that i dont use ai, but log parsing is easy. i just wanted to make it easier)
Set origin won't work for players. Use Teleport() instead
When adding a value to EEditableEntityLabel, is this the recommended way?
{ ENTITYTYPE_MYTYPE
};```
I am asking because some mods tend to add random const value to it. ..with a risk of collision.
Toss a comma at the end of it. I see that sometimes and just keep it there just incase. I figure if there's another modded enum of that class then the comma at the end even if there's nothing after, will be used to separate the next mods modded enum
Pretty much every mod i checked is using a random number.
Most of the time pretty big ones like 735865.
Using a random big number just feels dirty.
True.
Not sure if it even requires one tho.
They use numbers in vanilla and most modders are using numbers as well.
But yeah no clue. 
It's more of a random hex like shown in #enfusion_scripting message
No clue what it's actually calculated by, though. If there's a collision with mod/prefab GUIDs I wonder what BI would do.
GUID is a really big number so the collision risk is low. We humans doing random numbers is like, "hey, 1000 is a random number. Others probably thought the same so, I'll +1".
How performance-intensive would it be if I increment a float by 1 on EOnFrame for a trigger? (Assuming the rest of the math logic and damage calculation are handled separately.)
We do that all the time. The question is how many entities do it? If you have the code on every item then you need to multiply the cost by 25000 on Everon for example.
Ideally if you just want to wait for something to happen, instead get the World timestamp once and compare if the time now is greater or equal
Is there anyone who knows a script or component that allows random spawning from the "Character_USSR_Randomized.et" file?
For example, I'm using a BaseGameTriggerEntity. I have, say, 200-300 of them on the map, and let's say 100 players will simultaneously enter the trigger (not necessarily the same one). They'll get +1 to the float variable every frame until they exit, and that's it.
If you just want to so capture score, and more people make it go up faster use an integer instead, not a float. slightly cheaper math.
@brazen sphinx Make this EEditableEntityLabel enum use EnumLinear decorator so that modders do not have to run into collisions.
I would say, expose it from CPP with same values and set the pivot to the current max in vanilla. So that we do not break configs and prefabs for modders for those implementations that store it as int and not enum.
, has nothing to do
Is there a way, like a component that already exists that could delay the trigger of the warheads damage?
any way to get client ips from server? i know parsing the log but hoping to bake some functionality into an addon without requiring other setup
nope
IPs are handled via battleye I believe they arent exposed in the base game controllers
can battleye rcon access them?
otherwise I feel like they could be used maliciously and no only logs display it
I think it was built that way for security reason and preventing scriptors/hackers from obtaining IP addresses
that makes sense
use case is im working on some admin tools and would like the ability to check multiple accts on the same ip etc
Yeah, unfortunately it isnt possible without doing it via a rcon panel that parses logs and identies of players
Yeah absolutely, it's way easier than parsing/searching logs especially on mobile for my customers
At least unlike Reforger RCON, it works properly too
very nice. is there a reference of be rcon commands?
we're one of your customers as well but have own tooling around ip checking and log parsing, which i'd like to get rid of
In the case of a vanilla class not having a constructor, what happens if I add one in a modded class of vanilla class? What happens if two different mods do the same?
ooh i see be rcon #players returns ips
Yeah it's quite simple. In your case you could use the service API to run BE RCON commands but that would vendor lock you, so I would still recommend using BE RCON directly for your use case to stay independent, whichever is easier/more important for you. The other difference being that the service API doesn't require you sending your password in plaintext, as it auths you via bearer token and then connects via localhost remotely (that sounds weird, but it should make sense).
yeah makes sense. so is rcon port even exposed directly by default? or restricted in docker network
You may need to toggle a checkbox for BE RCON
The first one declared in the hierarchy sets it. If another mod does not have one but mods base class it would work. Another mod on a child class or if vanilla has a child class it won't work
Is there any signal/event sent on prefab/object destruction that I can use to terminate a script started from this prefabs action menu? Please tag me here if you reply, answers get lost here easily without pinging🙂
What about the destructor
There is also ScriptComponent::OnDelete, which gets called earlier than the destructor.
@dire sinew @ocean kernel is it explained in official wiki or anywhere else to feed it to AI and get something potentially working?🙂
Feeding to some LLM sounds like an IP nightmare...
You will breach our IP and EULAs if you feed anything from our game to AI
I'm not sure you might be cooked and have to learn script 🙁
I still need to figure out how it works to script it myself, I just need to trigger my script to turn of the ongoing projess when entity is destroyed. Maybe any good examples?
How do I make custom rcon comands?
Inherit ScrServerCommand, have a look at some simple one already existing like #players. It is quite simple you get an array of arguments and have to return a specific result type for basic commands.
Appreciate. I couldnt remember the class
Wasnt there some youtube workshop for scripting? The biggest barrier of entry is how to make your scripts do stuff in the game ie. how do I make my code do code things when the game is running, once you're past that then it's just programming in general
And we are adding ondelete to generic component too, so some of those who previously had no way to catch it will have it soon 🙂
Well finding the right event to trigger/stop the script is what I'm struggling with. E.g. when things are spawned or despawned, or destroyed. Code part is not a problem
OnPostInit on script component for spawned, ondelete for about to be destoryed. that is where we reigster and unregister all our entities to some managers and systems
With the caveat that if you want to interact with other components on the entity, to use EOnInit instead, as it is called after all components are initialized.
Thank you! @dire sinew @torn bane @ocean kernel , ondelete should work for me
While I agree with the decision, how is this actually being enforced? Plenty of mods with AI generated code exist on the workshop
It has never been allowed
It was not a decision we took in recent years
Our IP and EULA have never allowed for this
This specifically refers to using exported game data or workshop content to train a model correct?
Everything, you cannot feed an llm reforger code that you do not own, so you can only train a model with code you've written
Workshop content is also not allowed, some of the tech found in a mod would also not be allowed if it comes partially from us as derivation too even if the modder tells you it is allowed from his's
So when something is moved from a component to componentclass
But I need it to remain on the component because of state
Wat do
Do I have to mod all the classes that use it and make shit code?
If it were a sandwich, the class is the bun and the component is the bacon
It's more like there is one bun for many bacons
Are you talking about an attribute that you moved to componentclass or a base game attribute that got moved to componentclass?
Specifically SCR_SpecialCollisionHandlerComponentClass.GetSpecialCollisionDamageEffects which used to be on the Component
I was doing a funny and returning null under some conditions
Yeah, I get the pain 🙈
SCR_EditableEntityComponent::GetInfo, for instance, has a nice pattern that uses the component data by default, but can be overridden by a custom instance. Unfortunately not applicable here, as the getter is on the ComponentClass.
so i want to write a small script that disable the ability to respawn from menu when unconscious IF there are conscious Teammates within 100m. Can anybody help me out (have coding expereince, new to enfusion...)
starting with https://community.bistudio.com/wiki/Category:Arma_Reforger/Modding
because it touch a bunch of different knowledge
id say first learn how to make a mod/override stuff scripting wise, then check how to get some entities/players pos stuff and then check how vanilla game does handle the UI of this respawn button and then combine it with previous entities pos knowledge
and dont forget to enjoy the journey
How can I show a custom image for an item in the player's inventory instead of the default preview of the item's prefab?
I've set the Icon in the InventoryItemComponent, that doesn't seem to have any effect
(Asking in this channel because I've not had a reply in three other channels over the past few days)
NVM, messed up my gamemode temporarily. that's strange: why is debug skipping over some of my functions (that return a class)? even with step into or breakpoints inside.
hi- quick question
i am a little new to scripting in arma reforger enfusion. s
soo have a little hard time to find in the
Arma Reforger Script API.
i want for Debuging purpors
change the Spawn Timer on Vehicles from 300 sec to 10 sec or remove it completly .
what i have tried does not work ,
// ==========================
// DEBUG: Override vanilla spawn protection
// ==========================
if (PopVehicleLimitConfig.DEBUG_OVERRIDE_VANILLA_PROTECTION)
{
SCR_VehicleSpawnProtectionComponent protection = SCR_VehicleSpawnProtectionComponent.Cast(
ent.FindComponent(SCR_VehicleSpawnProtectionComponent)
);
if (protection)
{
protection.SetProtectionTime(PopVehicleLimitConfig.DEBUG_VANILLA_PROTECTION_SEC);
PopVehicleLimitLog.Log(string.Format(
"Spawn protection overridden to %1 sec",
PopVehicleLimitConfig.DEBUG_VANILLA_PROTECTION_SEC
));
}
any suggestions ?
Just mod the class itself.
Put it in YourProject/Game/Scripts directory.
Go to Script Editor > Build > Validate and Reload Scripts
thx will try
Hi! I found this in scripting conversions and maybe need some clarification:
It is important to keep moddability in mind when scripting to ensure. Modded classes work very similar to inherited ones and come with the same restrictions:
Constructor/Destructor: a modded class has its own const/destructor and cannot modify the parent one```
If i want extend the destructor in modded class, do i need copy all lines from original class by hand?
ah NVM, breakpoints stops the game on modded and then original destructor too, all fine, both runs.
I ran into another issue related to deleting entities.
Basically, when deleting non-replicated loadtime entities on the server, they will still appear on the client if they are not destructible. For example, destructible trees are removed successfully for a joining client, but not bushes that don't have their DestructibleEntity "Enabled" box checked.
I assume this is related to Regional Destruction Managers? I heard they are responsible for replicating destruction of otherwise non-replicated loadtime entities.
So these probably won't take care of anything that's not destructible - so deleting any loadtime entity is impossible without manually writing some system like the Regional Destruction Manager that handles deletion of any entity?
Also, I don't think the World Post Process event is correct for safe deleting. First of all, it doesn't work at all for replication to clients, and secondly it complains about it ("was destroyed during loading. This may break item table for JIP").
Maybe it was one frame later. There is also a replication runtime started event on world systems that is definitely correct to implement deleting on.
And yes there is no logic to remove non replicated entities. If removing them is not deterministic then you need to implement your own sync to remove them when they reappear. Best would be to delete them with an entity placed on the map, so if a client re-enters the bubble the deletion is repeated
And the regional destruction system is exactly our solution to the problem. A lightweight system to avoid making all of those loaded entities replicated
You can't magically delete them on the server and have the clients know about it. PrefabDeleteEntity or custom system, or destruction or full replication. Those are your options
To me it sounds like replication by deterministic loadtime entity ID is the only good approach here, like the regional destruction managers do. It's unfortunate the game doesn't have a generalized system for this and only handles destructibles.
what am i doing wrong?
You can have a destructible that simply is configured to disappear instead of any multi phase. But in the end, yes entity ID is what is used anyway
I think it wants integers not floats. Check other usages of it in script
in some case they do the same thing
You should use floats, but 0-1 not 0-255
okk thanks @sweet badger
General question about scripting chats to an entire server. Does the ShowHelpMessage display for all players? If not, any ideas on what would?
No, it's local
I don't know if there's a method that does this, if not you have to make one and a broadcast for it yourself
I was attempting to broadcast a help -styled message
Guess I just don't have a way to confirm others are seeing it yet
You can test with PeerTool or Dedicated Server Tool
Any docs/guides on those? Nvm, think I found it
Anyone able to help me figure out how to grey out/disable a specific vehicle in the Conflict vehicle spawners? I've been struggling for days trying to figure it out
I've managed to make a script that tracks how many of a specific vehicle/prefab are alive in the world and register limits for how many total I want to be allowed to be spawned in at once but I can't work out how to disable them if they meet/exceed the limit
so i worked on the script, did like you suggested and disabled the respawn button via UI/pause menu according to my criteria for respawn, logically should work how i want it to, but how do i test it in workbench though?
Im looking to add an event for when people place down vehicles from the vehicle depot menu. Does anyone know where the code is for it?
Or does anyone know where the code for spending the supplies when placing a vehicle is?
Would this be the place to ask about els light?
Maybe on one of the components of the corresponding editor mode entity: Prefabs/Editor/Modes/EditorModeBuilding.et
Have a look at the vehicle entity catalogue conf file of the corresponding faction in Configs/EntityCatalog/. Make an override and uncheck the BUILDING editor mode for the entries you want to disable.
For this part you likely have to introduce a custom budget. There is already one for AI count per base, so might help as a guide.
okay so
do I just mod everything that uses the damage effects that moved to componentdata
- 1 with @dire sinew with making a budget in an array, you can do this in the spawning logic to determine if it can spawn or not.
Assuming faction doesn't matter, something like:
if (prefab_count > 10) {return}; // 10 is max
else {continue} // resume logic
No, what I meant is introduce your own custom budget type. There already is a budget framework for editor modes, such as building.
I'm afraid so...
hello, Is there a way to reset your rank when you die? If not, can you help me with a script to do this, please?
Rank is handled via experience. This is accessible on the player controller. You can set the exp to the base rank equivalent. If you set it to 0 people would become renegades
How's the portability of scripts from Reforger to A4? I guess their APIs will differ so you can't directly port the code?
If it is your own code, you can keep it as is, anything interfacing with the game will be completly different
Yeah that's what I tried to ask, thanks 👍
Question, I want to create more custom scripts (for example I created a script that will sent the in-game events to my webserver - not tested yet) but I want to learn more about scripting, any tips what I can do to grow in this? I'm a php developer, so the coding self will not be the problem (or AI will help) I think is more where do I put the code etc
You could do it via REST API requests: https://community.bistudio.com/wiki/Arma_Reforger:REST_API_Usage
And for serialization/parsing with JSON : https://community.bistudio.com/wiki/Arma_Reforger:JsonApiStruct_Usage
Read api docs, you can send a lot of stuff to the web server! And vice versa!
Happy to share a working pattern if you want a starting point
Would appreciate that! Because when I read some tutorials on that wiki is says “create this class” then I wonder, where? And why there? How does it get loaded in the first place etc
// MyWebhookCallback.c
// 1. Handles the HTTP response
class MyWebhookCallback : RestCallback
{
override void OnSuccess(string data, int dataSize)
{
Print("[WEBHOOK] Success: " + data);
}
override void OnError(int errorCode)
{
Print("[WEBHOOK] Error: " + errorCode.ToString());
}
}
How can i apply physics impulse to a player while they are standing still? It seems like applying an impulse only works while the player's velocity is greater then zero?
Physics physics = player.GetPhysics();
physics.ApplyImpulse("0 500 0");
Nothing happens when player is still. However if i walk forward and call this, it does work.
What is the right way. This gives errors:
modded enum EEditableEntityLabel```
This does work(I do the same) but keep in mind it is being deprecated
It was for the person who i tagged to fix it in vanilla
Dont add the enumlinear yourself
yes i know, its gonna be pain
Is there a replacement implemented or upcoming? Feel like this will impact a lot of people
@meager drum
Just noticed this example doesn't include how to get the data, this is how i do it
private void ConnectUserOnSuccess(RestCallback cb)
{
LogBackend("SDS_ConnectUserCallBack.ConnectUserOnSuccess " + cb.GetHttpCode());
SDS_ConnectUserResponseJson response = new SDS_ConnectUserResponseJson();
response.ExpandFromRAW(cb.GetData());
}
yes i sent it in private didnt want to clutter here but thats correct!
// 2. The component — attach this to your GameMode entity in Workbench
class MyWebhookComponent : SCR_BaseGameModeComponent
{
protected static const string WEBHOOK_URL = "https://your-server.com/";
protected ref MyWebhookCallback m_Callback = new MyWebhookCallback();
override void OnPostInit(IEntity owner)
{
super.OnPostInit(owner);
// Hook the event you want — this one fires on player kill
SCR_BaseGameMode gameMode = SCR_BaseGameMode.Cast(owner);
if (gameMode)
gameMode.GetOnPlayerKilled().Insert(OnPlayerKilled);
}
protected void OnPlayerKilled(int playerId, IEntity player, IEntity killer, notnull Instigator instigator)
{
string payload = "{"event":"player_killed","playerId":"" + playerId.ToString() + ""}";
RestContext ctx = GetGame().GetRestApi().GetContext(WEBHOOK_URL);
if (ctx)
ctx.POST(m_Callback, "/webhook", payload);
}
}
Man please use jsonapistructs or save context to create json 😭😭
lol sorry hahaha
scr_jsonsavecontext and scr_jsonloadcontext
What does placing an entity as game master do differently to its flags as opposed to spawning it with spawnentityprefab?
I have some stuff in EOnFrame that runs serverside that moves an entity around and it only works after spawning via GM, not via SpawnEntityPrefab, even though I set the frame flags on init
ok figured it out, next question - why is standing on a vehicle resetting scale of a character entity and where can I turn that off
also, in game master the NON_INTERACTIVE editable entity label does not prevent me from dragging it around, unlike before 1.6.0
did a different label replace it?
I am adding another layer of nesting to this reply to you
#enfusion_animation message

If scaling is not supported then why is it actively being set when standing on vehicles?
Because the math most likely requires it to be something specific
Scale not supported means that custom scales are not expected
Not that scaling does not work in engine
On many logic we have, for the sake of performance and even sometimes lack of knowledge of the developer that worked on it, the 3D math there either expect orthonormal matrices or has math that does not take into account scaling at all and thus either breaks or resets it to 1.
Okay, how do I make the entity ignored by the Make Changes To Entity When Standing On Vehicle function?
Just exclude it from that system altogether
Also where is the script responsible for selecting entities in game master? selection ui component doesnt actually select entities
Oh it sorta does, but ignores entities that are flagged NON_INTERACTIVE
This is because NON_INTERACTIVE flag in Reforger means actually interactive but sometimes not
I need a way to make it not possible to move an entity around in GM (can select it, use context actions, but not move it around)
When this is set to No Value, it still spawns a group for the character
Expectation: When set to None, result is None
I might be better off just making the entity not register maybe?
I know almost nothing about GM, except that placement thing from the other day
I am not sure anyone that worked in GM is active in the discord as well
I will ask internally and try to find out
Boy we would to have some them guys around here
There is one .conf file that lists all the structures a GM can spawn (and player built, and HQ) but I can't remember its name. There's also the array in EditorModeEdit.et > SCR_PlacingEditorComponent that GM also calls.
I’ve done this before but I’ll have to dig up the old script
I’ll take a look tonight
This kind of sounds like the issue I had with sub-prefabs in compositions: I had to duplicate the sub-prefab, modify it, then swap it out in the composition for the component settings to carry over correctly.
Is the OFPEC tag still relevant?
Honestly I am pretty desperate, I have some entities that absolutely cannot be moved around ever by the GM
If they don't have an editable entity component enabled they are not interactive in GM
They cannot be moved, they can be deleted or given waypoints or other actions
I feel like this is what NON_INTERACTIVE flag did before 1.6.0
Alternatively since those are compartment occupants maybe something in the compartment to prevent yeeting out crew
do we have a class similar to deque from python? if not, could we possibly get one?
Asking this again as i can't find a solution other then TPing the player slightly in the air which isn't great.
How can i apply physics impulse to a player while they are standing still? It seems like applying an impulse only works while the player's velocity is greater then zero?
Physics physics = player.GetPhysics();
physics.ApplyImpulse("0 500 0");
Nothing happens when player is still. However if i walk forward and call this, it does work.
Are there like tutorials to make server mods only?
Hi everyone,
Do you know if a mod exist to make possible to communicate in game via open mic ?
Without to have to double T for exemple.
More like TFAR in Arma 3, constant open mic for instant communication via voip, thanks guys !
The "description" of the class says
"Two main types of physics bodies are static and dynamic. Static bodies are represented
by a collision object and dynamic bodies by a rigid body. This means certain methods make sense only when dealing with
a dynamic physics body, e.g., Physics.GetVelocity, Physics.ApplyImpulse."
Which leads me to believe that those examples should only work with dynamic bodies. Which the character isn't. It has no Rigidbody and IsDynamic returns false. I can confirm that the velocity being greater than zero does allow it to work though, which could be unintended?
I only tested from remote console but you can call CharacterControllerComponent.SetJump and then apply the impulse.
The lowest value it seems to work with is 5.
Eventually a class may grow in size (2000+ lines) and it makes sense to split it in to separate files. I would like to keep the functionality inside the class, but for example move getters/setters to another file. What is the recommended way to do it?
I would just mod the class.
You don't
Because I have seen videos that somebody created some scripting and dragged it into the “world” so I thought that’s not needed for a server mod
File1:
..stuff..
DoNewStuff()
}```
File2:
```modded class MyClass{
..more stuff..
void DoNewStuff()
}```
This gives me errors that file1 can not find a new function defined in file2.
They're getting complied in a weird order or something then.
Yup, I tried even renaming them so that the other would be earlier. Same effect.
//CustomClass.c
class CustomThing
{
int m_Value = 12;
void Add(int Add)
{
m_Value += Add;
}
}
//CustomClass1.c
modded class CustomThing
{
int GetValue()
{
return m_Value;
}
}
This works.
In the same folder
... sorry, made a mistake .. re-testing.

Spit it out Mario lol
Order does not matter when you have original class and modded class
Modded classes get hoisted
Something weird happens sometimes.
I've had the issue that he's currently having before.
Recompile on host probably broke if you used that
I think I recall a problem where if you changed signature of the method at some point, it could get messed up
But i was never able to repro that myself, I just saw reports a long time ago
But that is how it works
Modded get added to a queue of sorts
and processed after
Yeah it seems to work fine now.
og script in Z and modded classes in A
and it still works just find.
fine*
I think you may be trying to call some functions in "unmodded" class that exist in the modded class?
That is exactly the problem.
Yeah you can't do that.
Try: If you have GetValue() call in the unmodded class.
Is there any way to go around this?
Modded class is not a merged class
When you do this
Put all functions that you're trying to call from the unmodded class in the unmodded class.
class SomeClass;
modded class SomeClass;
modded class SomeClass;
modded class SomeClass;
What happens is that you create derived classes.
It ends up like this
class SomeClass#1#0;
class SomeClass#1#1 : SomeClass#1#0;
class SomeClass#1#2 : SomeClass#1#1;
class SomeClass : SomeClass#1#2;
It create new classes and renames them
and ties them with inheritance this way and makes the last modded one to be named as the original
If you're specifically trying to call the "external" getters, just get the variable directly instead.
So if the previous one had no access to some method added later, then it won't compile
All this makes sense. I'll just add a stub in the original class and have moved functions as override in the modded class.
So next thing would be is I plan to ragdoll that character then apply an impulse. Which behaves in the same way(so your solution works). The ragdoll is almost certainly a dynamic rigid-body right? Perhaps there is special way to get said ragdoll body?
Anyone know a way to prevent a character from being able to be moved or removed from a vehicle? By a game master
How about overriding SCR_EditableCharacterComponent::SetTransform and handle the case when changedByUser is true?
There is also parent entity changed or something
On the EditableEntityComponent (Char version I guess)
Call this method SetEntityFlag
And set EEditableEntityFlag.NON_INTERACTIVE I guess
Or search for where this is read, and target some specific condition of yours
Ah but that is the thing you mention is broken
@ocean kernel I think I see the specific commit that broke this
I will discuss internally with the dev that changed it
Short story short
They tried to fix a bug and introduced another one, the one you are facing
Now time to go to sleep 
Have you looked about halfway down in this post? Looks like it was fixed in this mod: #enf_showroom message
"Fixed VM exception in SCR_EditableCharacterComponent where null vehicle reference caused GM editor crashes when moving characters out of vehicles"
How does one define an interface? Wiki mentions it briefly but I'm not sure about the syntax
Just write a class, but there is no interfaces from C# or traits from Rust.
Are there any plans to add actual interfaces at some point? I think it would be very handy to have an option for a class to implement multiple interfaces 😛
Is there something I can mod out to get previous behavior without waiting for upstream fix? I really want to release the mod this weekend and this is the only major blocker
We were toying with abstract keyword but it was paused due to other priorities
Yeah, I will get the modding quality programmer to fix it as a mod and send it to you.
How big of an issue do you think this is?
I am thinking of having some oficial mod for modding / script side fixes for community that do not have to wait release cycle perhaps.
In general it's a expectation vs reality thing just very confusing. I doubt a lot of modders rely on this specific thing, but things not doing what you'd expect them to can be frustrating
My preference would be to stay away from a mod you can use as dependency as the changes in such mod can impact people that have designed their mod for cases where those fixes are not implemented, resulting in another case of stable vs experimental
Providing those fixes in a format where they can be implemented to only function inside the relevant mods would help me get my stuff moving forward without impacting anyone else
It was more aimed towards big problems
Sometimes we are really locked by release process, so in those cases it can be useful
It'd be great if WorkBench got updates outside of the game updates to correct major and annoying issues if the game update is too far out. They'd just have to account for the community WB version getting patched and the next version getting patched.
And to work better with Linux/Proton
@minor agate Is there no way to apply impulse to an idle player/ragdoll of a player? One would think that the player ragdoll is a dynamic body so impulse should work? Perhaps I'm not getting the ragdoll properly? Appreciate the help.
cc.RefreshRagdoll(1);
cc.Ragdoll();
physics.ApplyImpulse("0 1000 0");
Pretty sure you're supposed to call the refresh after
I could be wrong but, I'm pretty sure some comment somewhere indicates such.
I think either or works in my testing. But issue still stands with not being apply impulse to ragdolled player. Jump method works. but if player is prone ect, it doesn't. Teleporting works, but fucks the camera too hard
Does somebody want to review my script? As return favor I can review a PHP script for you (since thats my expertise 😂 )
Search for something ragdoll effector, on the animation component. Apply your forces with it then ragdoll.
Characters are not physics objects themselves.
Onlything I see is AddRagdollEffectorDamage which isn't for getting the body/applying forces? I also see PhysicsRagdoll.GetRagdoll but that doesn't return anything and it returns a PhysicsRagdoll not Phsyics.
AddRagdollEffectorDamage is how you apply physics force to a ragdoll. You can make the character ragdoll afterward by setting them to unconscious through the character controller component or whatever it was.
Sorry going off memory
//! Adds damage effectors that will be applied to ragdoll once it is enabled.
//! @param posLS Position in character's local space.
//! @param dirLS Normalized direction in character's local space.
//! @param force Force in m/kg3
//! @param maxLifeTime Duration in seconds during which this damage is applied (scales with reduction).
//! Call this only on the server. Replication to the owning client is handled in game code. Remote proxy clients do not need this information, as the ragdoll initialization state is replicated to them when they enter ragdoll.
proto external void AddRagdollEffectorDamage(vector posLS, vector dirLS, float force, float radius, float maxLifeTime);
But this is how this mod works
What mod is this lol
Banana Peel Mine, broken in 1.6 though, you can download it but wont be able to run it
But the strategy is apply ragdoll effects and then set character unconscious.
also i don't have an issue with applying forces while moving. It's only an issue when the character is idle
Alright this works!! Thank you!
Just post your script.
It's not possible because WB and Game are deeply integrated
So you need to update both
If we fracture like that, it would also possibly cause modders to publish mods that work in WB but not in actual game
This mod lives rent free on my brain
this is already a thing tho 
WB has same version of Engine and Game as the Game package
A bug in WB not showing in Game is just due to developer features enabled in WB, and some caching done on the embedded Game within workbench.
But it is the same code, same data
What I meant is that we are not doing WB (With newer Enfusion for example) when Game package is older version
I think my problem when it comes to works in WB but not ingame is understanding client v server. WB runs both so ofc everything will work. But trying to use the peer tool or the DS through workbench to get stuff working, it still then doesn't work ingame sometimes.
Can ya'll release more usable plug ins for common things, like automagically add vehicles, weapons, etc to the arsenal, build menus, GM etc. Such a pain to do it manually
@queen silo for you 
Can you write in a reply to this with the specifics?.
We can make them, yes.
Same here. My wish is that peertool would be a real client to avoid finding issues in DS environment.
Any chance they will get back to me today plsplslpsplsplsplpsls?
Mods meant for training could be huge
That begs the question, is there intention of an ArmA 3 esque arsenal system added to the game? (A4 if anything I'd assume)
Hey, I'm looking on it, but probably won't finish it today.
If you'd write me some specifics - will be great, but I generally get the problem.
My objective is pretty straightforward, I have a character inside a vehicle and I dont want to allow game masters to move them out of the vehicle or generally move the character around. Vehicle itself is ok, just not the crew.
You can find AR plans on the roadmap
We can't tell you anything about A4 until the roadmap for it is released when it comes to it's design
New WorkBench Plugins
alright tho who here is doing mod work on not conflict but combat ops script work cause thaty shit been stumping my ass lately
A4 Roadmap: hope to make something that works 
In a vehicle with multiple turrets and spawn occupants enabled, in MP some characters that are spawned in the turrets are just stuck in mid air for the client, wtf
I see that happening too when spawning AIs to helicopters. If I have multiple peer tools open, each client sees a different reality. In one, everyone is inside, in others they might be there or not.
Happens sometimes with normal vehicles too. Don't know how to properly repro so it's hard report.
I cant repro in peertool but can repro in dedicated server
I tried inflating my ping to 500 with peertool, doesnt seem to be a race condition
but who knows
I guess (bet?) if you would have multiple clients to look at the same spot, they will see different things. Some replication issue (on BI end)?
Where can I get list of all the available actions like CharacterRight, *CharacterForward * etc ? I'm looking for direction change and roll actions in particular
{795184CF9AD764DB}Configs/System/chimeraInputCommon.conf
How to I get the level name in the override void OnGameStart() ?
The best way is GetGame().GetSaveGameManager().GetCurrentMissionResource() because that works with workbench, mission header or raw world file etc.
Reforger doesn’t like multiple turrets for some reason, I was thinking it’s anim graph bs
Did the base game stuff for turrets get modified to recognize more than one turret, or is it some kind of vanilla override on the original turret stuff to add more
Before 1.6 nobody I know could get more than 1 gunner seat to work at a time (excluding btr)
Any extra turrets would result in broken anims
It's always TWO TURRETS that do it. I think I might just move the turrets from slots to good old hierarchy.
Yeah hierarchy is more reliable in some cases
I think the main issue is the anim graph variables are the same , so when you add a new turret to the entity by slot or compartment there no way for the entity to know what anim goes where
With hierarchy that shouldn’t break
Our vanilla turrets that are added by slot are always contained in some wrapper entity. Usually the full turret is some visual object and inside is the actual weapon with turret component on it. That way the LAV has multiple turrets working
Is GameSystem concept documented somewhere or are there any great threads/messages in Discord that goes trough what their purpose is and when I should make a GameSystem?
Is there a way to do http requests to a web server but more advanced?
https://community.bistudio.com/wiki/Arma_Reforger:REST_API_Usage
The REST API is only meant to provide basic REST functionality (GET and POST methods - see HTTP request methods), not full server functionality (like e.g curl).
Data size accepted by the API has to be below 1 MB
There is no support for custom headers
There is limited printout
Headers are supported, they are key,value,key,value format on setheaders. Print is just limited in its max length the recieve data size is the maximum a string can hold AFAIR. sending is limited to 1MB yes.
So the documentation is not up-to-date?
Correct
Thanks, will try!
You mean like this?
ctx.SetHeaders("Content-Type,application/json,Authorization, Bearer " + token);
except for the leading space there, yes
Thanks. I didn't even know there was a whole enfusion scripting API wiki available.
Is there a component that automatically lerps entity transform changes in MP?
What about NwkPhysicsMovementComponent and co?
I know that this doesnt lerp
I can see the stutter of the entity in MP as client
It might be for actual movement, not just a transform change
You can't just set transforms. It needs a velocity such that it can do predictions in the first place.
Ultimately, you probably want to model some trajectory, so just knowing the positions is not enough for making it smooth. Or what is your actual use case?
Can I simulate a player killed event in the script editor?
Which particular handler do you want to execute? Or do you just want to kill the player with scripts?
override OnPlayerKilled
I mean just for testing the override, you could run MpTest.ent and call the Kill method on the damage manager.
Because I'm creating a script that send game events to my webserver, so now I do publish to workshop, restart server and try to replicate an event (OnPlayerRegistered and OnGameStart is easy to test) but the feedback loop is horrible xD
Horrible indeed. Why don't you test with play mode in world editor first?
This now seems to work 100% of the time, except I have to delete the child entities on entity death through script, but small price to pay for less bullshit
And once you got it working there, you can use the dedicated server tool in the world editor for testing MP.
Did you try to infer and set the velocity based on the previous two transforms? Probably not perfect, but could improve it a bit.
Its better after replacing it with the NwkPhysicsMovementComponent, thank you
Can someone tell me what I need to create dynamic markers or provide an example code snippet?
Well, I'm new to this so I didn't try that yet, I will see if I can figure that out 😛 thanks
So an other question, if I do a git init in the folder where my addon is, will this also be published to the workshop?
No, only Enfusion-relevant file formats get packed, so no gitignore and such will get included.
Then you may want to have a look at the tutorial series: https://www.youtube.com/watch?v=Fgl_mAHReP4&list=PLfUcrRpCM_fKjkTrkV-bqnknVbFCPA3YU
https://reforger.armaplatform.com/news/modding-boot-camps-introduction
This Modding Boot Camp seminar was originally held on the Arma Discord Server on November 20th, 2024.
Join Modding Supervisor Mario Enríquez for our first Modding Boot Camp, where he gives a quick overview of the Arma Reforger Tools and Workbench.
00:00 - Modding Boot Cam...
The replication ones should also show how to use the dedicated server tool.
I try to watch that tho, but to much stuff was irrelevant for what I wanted to do
Why I can override OnPlayerConnected but not OnPlayerDisconnected?
I see OnPlayerDisconnected is protected but I don't understand why and how to find the alternative
Whoops, nvm, I looked wrong, I can override this
protected can be overridden
Yea I did an override with to less arguments and than it says I was not allowed to override, so after adding all the arguments it was ok 😂
modded class SCR_BaseGameMode
In that case you can override private too
Oh cool, in PHP you can only override public or protected stuff 🙂
That would be the case with normal inheritance too
But the modded keyword means "hey i want to toy with things that don't belong to me and that weren't meant for me to touch"
Yea it is a bit tricky tho, would prefer to have events and create subscribers/listeners for that xD
you'll get used to it and eventually (i'm assuming you're kinda new to scripting) when you will want to alter with the way vanilla thing works it will be really useful
but i get that
But I can imagine when you have a game engine you want to be more flexible 🙂
also they did create an event system, we'll soon see it in AR and it should be fully integrated in arma 4
I have 15 year experience as PHP developer, but I'm new to Enfusion and c etc 🙂
Ah cool!
But I really like to play with this stuff, I created an eventsourced web application to store all those events
So now In the right bar you see the game server has sent those 2 events to my web server 😄 (I'm happy that I managed to make this work 😂 )
So my idea is you can have general server stats, and not only per round etc 😄
private void SendKillInformationToBackend(RGG_KillInformationJson killInfo)
{
SCR_JsonSaveContext saveContext = new SCR_JsonSaveContext();
saveContext.WriteValue("", killInfo);
string data = saveContext.ExportToString();
string uri = "kill?serverId="+m_ServerId;
m_RestContext.SetHeaders("X-AUTH-TOKEN,"+m_ApiKey);
m_RestContext.POST(m_KillInfoCallback, uri, "content="+data);
}
my method to sending kill information. This is called in the OnPlayerKilled function on a GameModeComponent
and a snippet from my staff panel where this ends up getting used
Ah cool!
My idea was to make my site public where you can register your server and install the addon
No idea performance wise how strong the webserver should be, but problems for later 😂
im running a website and discord bot through a 4 core/8GB RAM server rn, seems to barely even be touched by just web requests and some further processing in the backend
just a quick random question, i see that RGG_KillInformationJson is really close(identical) to the way i name my json api struct classes, did i share some code with you or is it just a pure coincidence ?
ah ok nice, I was also thinking to group events to not overload the webserver but thats for later 😛
Pure coincidence, i learned how to do web requests more proper by Sen
fair, was wonderring since i shared a bunch of similar code here, kinda saj
RGG is framework name scheme for Badlands, i use GSE_ for purely my scripts/mods
Whats that? a tutorial or something?
sen is a modder and owner of the KOTH servers
^
Ah check
or more like introduced me
I tried to find good tutorials but its hard to find something that related to what I want
Because you can do so much in this engine
look up what you need by keywords and you'll find code example you can learn from
that's how most of us learned
docs taught me the why, searching up relatable functions taught me the how
I tried AI to guide me a bit, but they mix arma 3, dayz etc to write code for reforger 😂
AI doesn't know anything about Enfusion Script so it'll hallucinate its way to victory
Ai is only good at stealing other people's work in reforger
Once you do start writing code, it gets repeatable depending what you want to do like setting up controllers for managing different functionalities of the game. More than likely can copy and paste your first one, then change whats needed to make the 2nd.
woohoo the spam bots made it here too, just got rid of one in our discord ;-;
also since you learned how to do api struct from sen are you aware of the RegAll() or nah ?
(bc he wasn't)
I wanna learn that api struct too 😛
hehe nah, i RegV() it all one by one 
One sec
Api struct
class SDS_KillInfoJson : JsonApiStruct
{
// Attributes
string victim_uid;
string killer_uid;
bool is_friendly_fire;
string killer_weapon_guid;
string killer_weapon_name;
string victim_weapon_guid;
string victim_weapon_name;
string killer_pos;
string victim_pos;
float kill_distance;
string victim_faction_id;
string killer_faction_id;
string hit_bodypart;
void SDS_KillInfoJson() // Constructor
{
RegAll();
}
}
yeah im doing it manually outchea
class RGG_KillInformationJson : JsonApiStruct
{
string m_sVictimPersistenceID;
string m_sVictimPlayerName;
vector m_vVictimLocation[4];
string m_sVictimWeapon;
string m_sKillerPersistenceID;
string m_sKillerPlayerName;
vector m_vKillerLocation[4];
string m_sKillerWeapon;
float m_fKillDistance;
void RGG_KillInformationJson()
{
RegV("m_sVictimPersistenceID");
RegV("m_sVictimPlayerName");
RegV("m_vVictimLocation");
RegV("m_sVictimWeapon");
RegV("m_sKillerPersistenceID");
RegV("m_sKillerPlayerName");
RegV("m_vKillerLocation");
RegV("m_sKillerWeapon");
RegV("m_fKillDistance");
}
void ~RGG_KillInformationJson()
{
}
}
I'll keep in mind the RegV big time though, annoying doing all that repetitive work
usage :
SDS_KillInfoJson killInfo = new SDS_KillInfoJson();
// Profile
killInfo.killer_uid = KE_Helper.GetPlayerUID(instigator.GetInstigatorPlayerID());
killInfo.victim_uid = KE_Helper.GetPlayerUID(victimId);
// other attributes
m_backend.AddKill(killInfo);
void AddKill(notnull SDS_KillInfoJson killinfo)
{
if(!m_isBackendReady) {return;}
killinfo.Pack();
m_context.POST(m_addKillCallback, m_endpointConfig.m_addKillEndpoint, killinfo.AsString());
}
what does the killinfo.Pack(); do?
idk if it's still a thing but back in 1.3 sometimes unless you did the .pack it would send an empty string instead of the formatted json
ahh gotcha
i had the issue once but i wonder the tostring does it for you ?
yeah ive never had a problem with the ExportToString, its how it Sen was doing it when i set this up
I would like to assign waypoints to a non-AI entity like a car. In GM, I want to click on this entity and then have the waypoint list on lower part of the screen (move, force move, ...). How could I achieve this?
Put an invisible AI group on the entity?
better if you generate waypoint later or add to group when unit get in the car, use get in event
My use case is different - I can't ask AI to man it. You know, like a drone or vacuum robot.
Waypoints are just entities that are called waypoints
But yes the waypoint toolbar shows up when you have groups selected
You CAN have empty groups
But then you are in charge of moving the GM group indicator since there's no group leader
What exactly is your use case?
Is there any decent net logger of sorts to get a full picture of the RPL componenets activity in the diag menu?
When a player is connected I get a player id thats only exists on this server, is there an option to get the Bohemia/Steam ID so I can track stats over servers?
scr idendentity utils offers a helper method
If an entity spawned by server wants to despawn itself (in ScriptComponent), what is the right way to do it?
Anyone had experienced ApplyTorque randomly applying 10x the torque that you ask it to? No clue why it happens but sometimes the entity just jumps 3458349534 degrees but higher torque is not being applied. turns out it was colliding with an entity inside its own hierarchy which is no longer happening after checking merge physics but now the blocker is entire workbench crashes without crash report when exiting play mode
Can you make a repro and send it to @brazen sphinx ?
Idk will need to see how much time itd take to make a specific repro
You can just share the project to him as is
And tell him just how to repro it from there
If I cant find a workaround I will
Ok, if you need help anyway feel free. (MIght throw him under the bus here haha) but unlike other programmers, he is hired to dive into mods like this and help find solutions for modders or fix problems on our side.
So he can make 0 mass projectiles with damage a thing again? 
.
idk I feel like mass in projectiles doesnt do anything
Yeah after the rework you cant do anything fun with them 🙁
you can set air drag to 0 but dont use the ballistic table generator as it'll just freeze
ig it just changes damage and maybe penetration,
Anyone know why ChimeraWorldUtils.TryGetWaterSurface doesn't work on these ponds and arland? Not sure if everon has issues too
Is there a reliable way to force stream and activate groups that are far away from the player? It seems the AI are not taking orders unless a game master goes to the location of the AI or a player gets close, then they seem to enable themself.
You hate to see a good person get hacked 🙁
Is there a simple way to a get a random position within a shape entity like a polyline?
There is SCR_Math2D.GetRandomPointInPolygon, but you have to compile array<float> from the points beforehand.
yeah, I found that, but I'm more so looking for SCR_WorldTools::FindEmptyTerrainPosition() but for a polygon, but doesn't seem like there's a quick method for it
You could in principle combine both and reject the sampled point if FindEmptyTerrainPosition with a small radius returns false.
In COE2, I saved a scan of the terrain with 1m x 1m cells with the information on whether they are flat and empty. Then when an AO gets created, I pick the cells that are in the polygon and the sample from them. That has the advantage that I know from the start whether it is possible to find a suitable cell in the first place.
Why Test Framework is not printing reason to normal log, but only to junit?
Because of this, "open autolog.txt" just open empty file (contains only "Line1: Begin Line2: End")
Test Framework (enf) or Autotest Framework (scripted, ar)?
in case of Autotest Framework anything printed to autotest.log is also printed to the console.log. Including failure reasons.
feedback goes here: https://discord.com/channels/105462288051380224/1441062665509277726
That available by F4 in script editor:
class MyTestSuite : SCR_AutotestSuiteBase {};
[Test("MyTestSuite")]
TestResultBase f() {
return SCR_AutotestResult.AsFailure("Reason %1 %2", "1", "2");
};
Just prints to autolog.log:
16:55:18
16:55:18 ############################################/
16:55:18 TestSuite #MyTestSuite started
16:55:21 /############################################
16:55:21
to console.log:
SCRIPT : ############################################/
SCRIPT : TestSuite #MyTestSuite started
some vanilla warnings
SCRIPT : /############################################
SCRIPT : SCR_TestRunner has finished running
SCRIPT : Autotest JUnit XML saved to: $logs:/junit.xml
SCRIPT : Autotest failed list saved to: $logs:/autotest_failed.log
and to autotest_failed.log:
f
So, only junit.xml contains reason:
<testsuite name="MyTestSuite" tests="1">
<testcase classname="MyTestSuite" name="f" >
<failure type="Result">Reason 1 2</failure>
</testcase>
</testsuite>
https://community.bistudio.com/wiki/Arma_Reforger:Autotest_Framework#Stateful_and_Simple_tests
Function tests are not fully supported in the framework. They'll be also removed in the future, use classes for tests.
Ok, now it prints everywhere...
SCRIPT (W): 'BaseCompartmentSlot' Trying to spawn character in compartment but it could not be moved into it so character is deleted. Compartment type: PILOT
Useless error: I can see the character is missing. Tell me WHY they could not be moved into it. Geez.
One case: Compartment does not have pivot.
Passenger Position Info? Present
It's a fake door too
Yes. Pivot ID empty. (This was my case when I got the error you're seeing.)
Doesnt work with Scene_Root still
Noticed that defines in my project do not stick when editing them in the editor, hmmm. Only PS5 sticks and shows the typical "bold" text showing that a property was overwritten/edited.
Can BTVariable Handle Array?
WORLD : Frame
AI (W): AI/BehaviorTrees/Chimera/Soldier/DCO_FindMagazineInGround.bt -> SCR_AI Get Current Magazine Prefab -> SetVariableOut(MagWellArray) - output variable type mismatch```
I Already use .type()
array<typename> magazineWell = {};
magazineWell.Insert(a.GetMagazineWell().Type());
How can I hook the Helicopter Engine RPM if i want to change it in game ? pls
What is your end goal? You can not easily modify any of that via script. it is a complex simulation where setting one value abitrarily destorys the entire stability
IDLE/FLY Engine power controller like in the real UH60
i tried to hook the MainRotor Throttle to 'fake' it and it's working but the thing is I want to get the EngineRPM so i can get a real control over it and we could hear the engine reducing power or going up
the thing is that i can"t find anything in the game scripts the VehicleHelicopterSim component is in read only i think and i'm a little bit lost
You could try using VehicleHelicopterSimulation.SetThrottle()
already tried but it's like the game overwriting it every second, so i tried to set it to 0.6 and it's like switching from 0.60 and 1.00 every microsecond (on the debug screen)
Yes, because the simulation is running and without player input the throttle is put back to 0
The helis are not designed to be operated by script
i would just let the player control the throttle as normal and sync the animation, so when they give collective thrust the lever just moves
and do you think there is a way or no to get to my goal of engine power controller because for now i'm overwriting the MainRotorThrottle so it cause power loss but the RPM is the same so visually and Sound is the same?
I do not think so
Ok thank you for your help I appreciate it a lot. Could I eventually DM you or @ if I had any more questions regarding the Game Engine pls
No, please ask your questions in the public channels so the relevant people from the dev team can read and answer. i do not know everything nor do i have time for everyone
Good copy, Thank you again for your help.
Is it possible to play Video in Game?
How is possible to get that AttachmentSlot name? I'm trying to disable some attachments with another (Not like the obstruction function) and can't find any clue
Only by grabbing it via the component source and getting the name from there. no easy access to it. but attachment slot component only has one slot, so the name does not matter. on multi slot from slot manager, you have names exposed and can get a slot by name too
The idea is that I have few handguards compatible with the same weapon and when I fit one that doesn’t have Picatinny rails, it doesn’t allow me to attach anything to the Left_Ris slot (for example). The obstruction system doesn’t quite work for this, so I’d prefer to disable the slot by searching for it by the name of the AttachmentSlot
SCR_WeaponAttachmentObstructionAttributes.m_aRequiredAttachmentTypes should work for that iirc.
It will require some BaseAttachmentType inheritance though.
Psudo-Example
class AttachmentHandGuard_YourWeapon : AttachmentHandGuard{};
class AttachmentHandGuard_HasRail : AttachmentHandGuard_YourWeapon{};
/*
Your Weapon will contain a slot for AttachmentHandGuard_YourWeapon
This will allow any hadguard of type AttachmentHandGuard_YourWeapon to be attached to your weapon.
Your ris attachments will contain SCR_WeaponAttachmentObstructionAttributes with AttachmentHandGuard_HasRail in its m_aRequiredAttachmentTypes array
If your weapon doesn't have a handguard of type AttachmentHandGuard_HasRail then you will be unable to attach it.
*/
The same could be done for the handguard that has no rail and you could obstruct the ris slot.
Either way works for exactly what you're trying to do.
can we get an update of https://github.com/BohemiaInteractive/Arma-Reforger-Script-Diff-Experimental
This is what I tried but don't work in any way...
Anyone able to help me figure this out? I'm trying to add a RHS radio to player's inventory on respawn, I've added the radio in the Loadout_CIV.conf that I'm pretty confident is used on respawn (cause it contains all the same gear as you can respawn with) but the radio doesn't appear in the inventory.
Then I found that there's this snippet from a script that references LoadoutConfigs and JWK_ELoadoutItemPurpose.NAVIGATION which seems to be used for the map in the screenshot but I'm not sure how to override this script so I can add that it also adds items using the JWK_ELoadoutItemPurpose.COMMS category?
if (context.m_bIsPlayer) {
JWK_LoadoutConfig loadout = JWK.GetResistance().GetLoadoutConfig();
if (JWK.GameSettingsCache().m_bRespawnRebelHandgun) {
context.m_iWeaponSetType = JWK_ELoadoutWeaponSetType.BASIC;
ApplyWeaponSetFromConfig(context, loadout);
}
if (JWK.GameSettingsCache().m_bRespawnRebelMap) {
context.m_iItemsPurposeInclude = (
JWK_ELoadoutItemPurpose.NAVIGATION
);
ApplyItemsFromConfig(context, loadout);
}
}
I guess I'm asking, how do you override a protected script from another addon so I can apply my own version of it?
Does the CollisionTriggerComponent do anything? Or how do I make e.g a grenade trigger on impact? 
I have the biggest jank workaround for making it work in my rubber duckie mod
Collision trigger component doesnt work when things collide, well, in some cases it does
It should be renamed to Specific entity type collision trigger component
The impact nade mods all have some sub munition projectile that spawns 0.5s after throwing and they collide or something but cant get it to work
Nah thats not jank, i like it 
I dont know what the license is but feel free to yoink if it helps you
Maybe you can make it betterer
Gotta make everything custom jank workarounds cause the vanilla components just dont work 
The funniest thing is those jank workarounds break less than vanilla
Made a simple version of it, works great. Even used LengthSq so no one can complain
Think for collision detection 10 million ray traces every frame should do the trick
One per pixel
Have anyone managed to solve the weird auto exposure thingy? or its just baked into the game engine and theres no point trying to bruteforce with HDR.emat?
f86e2c91-db6a-45e1-a4c2-b14fa49a4625
Can someone help me troubleshoot this issue from hell (experimental 1.7 Tools).
Workbench is crashing upon opening folder with prefabs, minidump points to thumbnail generation being culprit.
Interestingly enough, each time it crashes it's post thumbnail generation, so if there are 6 thumbnails, it generates 1, crashes, upon reopening, generates thumbnail 2, crashes, repeat. Once all are generated - doesn't crash.
Also seeing automatic crashes leaving edit mode. I can't provide a minimum reproduction yet, WCS_Armaments needs to be updated to compile if a BI Dev wants to look at the issue themselves.
Does anyone know who made the mode evannex
@minor agate hate to tag, but the engine hates this specific prefab and crashes automatically in experimental tools.
Does anyone see my messages
only if you start singing baby shark
Yes, we see your messages, but if someone does not reply, it’s because they may not know the answer to your question
Is there a way to add shaking on a vehicle hull
Yes
wait really?
Yes
I am not at pc right now, but there are already many examples for live video feeds, but if u actually need to play an mp4 for example, like a video clip and show it on a screen, you’ll have to split the clip in frames and then have the audio track synched (I think, I actually never tried this, I only tried sending frames to a web hook, but I remember bacon once explained how he’d do a video in game )
could use physics (will be bad), or just animate v_body bone in animation graph
Holy moly
Yeah 🤣
As I said I’m not really sure I am correct
There might be a proper way(?)
Funny enough there is a video widget, not sure if it works but, if it does you could add it to a render target.
Then have it play on an in game TV
I will look at it
You’re right! I did not see that, but that would make it much easier
Does anyone know about scripting
Just ask your question
Aight ty
No it won't. You can apply a little force and have 0 issues whatsoever
Can someone tell me what I need to create dynamic markers on Map or provide an example code snippet?
Entity, that will synchronize its position (by replication system without streaming (otherwise your marker will be visible only in network bubble), your own system or make if fully local to client), and map descriptor component on it
can I simulate a rotor brake system ? block the rotors from spining even if the engine is on ?
or speeding up down the spool down
There is video widget but it is disabled, Widgets can be used aas textures too
Ah, @river imp already explained it 😅
Wait but why it is disabled?
Problems with consoles
It was also not required for Arma Reforger, so it was never fully implemented too.
well it does make sense, but are there any chances it will be enabled again?
Does anyone use evannex mod
Please, stop spamming this on unrelated channels.
This is not even a question for Arma Reforger but Arma 3
It's being investigated for current Enfusion. I am not sure if it will be integrated in Arma Reforger, most likely it will as Arma Reforger updates their Enfusion version from time to time
Grown ass man btw
Gonna need you to stop being rude and disrespectful 
(Hilarious btw)
Has anyone got any ideas why the bridge prefab when swapped back into it's slot doesn't follow the parent bone pose when picked up?
It works fine in Single Player but not on dedicated servers so I assume It's RPC related but nothing I try is working...
@queen silo I think it's time now
it was before #arma3_scripting
next one is smite time
I've tried using VISIBLE flag which works fine but the physics remain active as it's still there
Ah wait I could just update the response Index to No Collision
Just disable the VISIBLE flag
Because that flag is only for the renderer
The only winning move is not to play
it works on Mp? i tried it before and it doesnt go invisible
Who called it, the server or a client?
client then RPC to server
{
override void SetVisible(bool show)
{
if (show)
m_Owner.SetFlags(EntityFlags.VISIBLE | EntityFlags.TRACEABLE);
else
m_Owner.ClearFlags(EntityFlags.VISIBLE | EntityFlags.TRACEABLE);
Replication.BumpMe();
}
}```
What is the object?
Character
i modify the herd onelife so its compatible with the dedicated server
right now, the spectator camera is working
but making the character go invisible
i have no clue
I have no idea what that means
since its only working on singleplayer
Replication.BumpMe doesn't RPC anything unless you have rplprops
This is the 2 Mod file
I have no idea how that mod works and i'm not gonna download it to find out.
This isn't even calling super, so all of the stuff SetVisible originally does isn't even happening.
modded class SCR_EditableCharacterComponent
{
//------------------------------------------------------------------------------------------------
override protected void OnVisibilityChanged()
{
super.OnVisibilityChanged();
if(m_bVisible)
m_Owner.SetFlags(EntityFlags.VISIBLE | EntityFlags.TRACEABLE);
else
m_Owner.ClearFlags(EntityFlags.VISIBLE | EntityFlags.TRACEABLE);
}
//------------------------------------------------------------------------------------------------
}
That was all I needed to have the character to be set to invisible.
alright i will try it
All you need to do is have the server call
SCR_EditableCharacterComponent::EnableVisibilityReplication(true);
SCR_EditableCharacterComponent::SetVisible(false);
Is there a way to choose what can and cant be spawned in the Vehicle Depots and Helipads?
It works perfectly
Thanks
well, another problem, when the guy reconnected he remains invisible and untraceable,
is there anyway to check if the player reconnected again? like till the server restart again he will remain spectator
{
writer.WriteBool(isSpectator);
if (rplID)
writer.WriteRplId(rplID);
return true;
}
override bool RplLoad(ScriptBitReader reader)
{
reader.ReadBool(isSpectator);
return true;
}```
i tried using this
{
myEntity = owner;
SetEventMask(owner, EntityEvent.FRAME);
}
override void EOnFrame(IEntity owner, float timeSlice)
{
if (isSpectator && !isOnSpectator)
{
int playerId = GetGame().GetPlayerManager().GetPlayerIdFromControlledEntity(owner);
int current = ideathCount.Get(playerId);
PlayerController pc = FindControllerByEntity(owner);
if (current > 0)
{
SCR_EditableCharacterComponent eCon = SCR_EditableCharacterComponent.Cast(owner.FindComponent(SCR_EditableCharacterComponent));
eCon.EnableVisibilityReplication(true);
eCon.SetVisible(false);
Print("IS VISIBLE? " + eCon.GetVisibleSelf());
ActivateSpectatorCameras(pc);
}
}
}```
and put it like this
ow can I create a scrollable button ?
like i hold f and i scroll with my mouse to adjust the value ?
Whats the feature called that lets you see what classes/functions are calling a specific class/function? Like an execution flow chart?
You mean callstack during debugging or flame graph
You mean like changing a value from 0-99, not scrolling the actions menu items?
yea just like that, so I can see what's calling what.
I'm not sure if flame graph is available for enforce
like a button in action manager and you have to hold it with f and to adjust value u have to use the scroll wheel
There are some features in debug menu (crrl+alt+arrows) like show statistics, but isn't flame graph
Also you can print callstack using Debug class
was hoping something like this would be in enfusion so I dont need to print debug: https://github.com/DucPhamNgoc08/CodeVisualizer
That might require some Action Manager component tinkering, you can probably see what the settings menu uses to adjust slider values. I've only messed with selectable items in action manager
i can't find a thing in the vanilla game that use them scrollable button. I've only seen them on the modded rifles to adjet the scopes position and also the mod that let you adjust doors position
I started developing this and other features. But this won't reach AR most likely as this is based on architecture and patterns for modders and game. Basically you will be able to see where to inject logic you want, how it affects other things including mods and so on. And will be able to see what things are easily moddable.
print debug?
You can just set a breakpoint
Where does DamageEffectEvaluator come from?
Specifically
class SCR_FragmentationDamageEffect : SCR_InstantDamageEffect
{
//------------------------------------------------------------------------------------------------
protected override void HandleConsequences(SCR_ExtendedDamageManagerComponent dmgManager, DamageEffectEvaluator evaluator)
{
super.HandleConsequences(dmgManager, evaluator);
evaluator.HandleEffectConsequences(this, dmgManager);
}
}
The evaluator, where does this come from?
Since it keeps throwing VMEs at evaluator.HandleEffectConsequences(this, dmgManager);
@static edge
Greatest moment from a non-regular character
It's a property inside of the damage manager
Wrong it's in the character damage manager
oh my god
string stackLog;
Debug.DumpStack(stackLog);
Something like this? Slap it wherever you want to
Please include a search function
Hi, when I create a camera and change its position, does my playerent also change position? '-'
Why would it?
I've already sorted that out; it was my mistake.
No
I should've read the whole convo
Sorry for the ping
oh my, this is EXACTLY what I was looking for. Release it as an unsupported plug-in maybe??
I print debug to see when something is getting hit and when without pausing anything, it helps see when something unexpected calls it. +1 reason I was looking for a code exec flowchart
Kind of, looking for something like Mario was developing -- a visual execution flow graph
Ahh I misunderstood then
Is there a way to hook LV of vehicle lights to change it with a button ?
can you tell me how pls ?
It depends entirely on what you mean exactly.
i want to change the brightness of a cockpit light with a button
action manager button or Lightmanagercomponent button
BRT+ and BRT- button to adjust it
If you want a user action, then create a user action that get the light and then have the user action adjust the lv of the light.
bro i mean what do I have to hook
I tried to hook everything nothing works for me
Get the vehicle get it's lights. Change lv of the light
but HOW ? also the light are a child entity .et
Yes and you can get the just like you can get anything else.
Get them from wherever they exist
I.E. if they are a child on the slot manager, get the slot manager, get the slot the light is attached to
no i mean child in the BaseLightManagerComponent
Then get that component.
i got them to change colors but i can't find how to change the brightness
There is a function that exists to do that.
Look at the class and look at the functions it has
One of them allows you to change the lv
you are not helping me brother, i tried what you said for the past 2 hours
also if I look at what RHS did it says for instance : [Attribute("10", UIWidgets.Auto, "Light LV - since BI one isnt accesiable then this one will be used", category : "RHS")]
protected float m_fLV;
it's not accessible
Then I guess you need to use RHS as a dependency and use whatever functionality that they used. Which I guess is m_fLV
I know that I was able to make blinking lights at some point by changing the lv of the lights
So they must have removed the exposed value for that or something
i mean there is not way to get that in vanilla ?
that's weird
Color NewColor = new Color(1.000000, 0.968994, 0.689998, 1.000000);
IEntity Vic = GetGame().FindEntity("Vic");
BaseLightManagerComponent BLMC = BaseLightManagerComponent.Cast(Vic.FindComponent(BaseLightManagerComponent));
LightEntity Headlight1 = LightEntity.Cast(BLMC.FindLight(1).GetLightEntity());
LightEntity Headlight2 = LightEntity.Cast(BLMC.FindLight(2).GetLightEntity());
Headlight1.SetColor(NewColor,20.0);
Headlight2.SetColor(NewColor,20.0);
ty i'll try that
Hello! I have an issue with my reload animation, I spawn an entity of a magazine on a slot, and I destroy that entity later. All with animation events. In the video you can see the weapon obstruction is triggered at the exact moment of the Destroy anim event. It's confirmed by a live debug with the player_main.agr
I guess I have to do something specific when i spawn the entity to avoid this, I tried to change simulation state, disable physics, use some flags... Nothing do the fix, I definitely missed something with the proper way to spawn an entity while avoiding interactions.
Then idk i don't toy with animations via script sorry
Is there anyway to fix SetWorldTransform from resetting an objects scale
Even when doing
childPlane.SetWorldTransform(transform);
childPlane.SetScale(2);
childPlane.Update();
childPlane.OnTransformReset();
The scale is set to 1
I can confirm just spawning the prefab in it maintains it scale but the minute I do this the scale resets to 1
What's the object?
It’s decently jank but a Ww2 asset pack has a C47 not properly scaled.
So I’ve made a parent object at 1 scale that players get in and it has the C47 mesh as a child prefab, essentially just a bare bones prefab with mesh, rpm component and hierarchy.
Teleporting the plane is fine it moves around like it should. But the children never get the rotational updates for some reason. This leads to me having to update the children’s transforms as well which for some reason causes the scale to be set back to 1 even if I explicitly set it to 2.
Why wouldn't you just scale the model in Blender?
It’s not my asset pack
You're using a dependency?
Yeah hence the super jank solution
I would just find a better asset that I could scale, instead of doing jank.
Or contact the creator and ask them to fix the scale?
How are these things children?
Slot manager component?
Or literal child prefabs?
Literal child prefabs, anything in slots inherit the scale of the overall prefab. Hence why I couldn’t just make the parent the plane scaled up as then the players inside are also scaled up
Children with a hierarchy component should follow the parent
They do but not the rotation for some reason. Thinking on that I could maybe get away with setting the angles on the children and maybe that won’t update the scale
Or attach them via a slot manager and use a custom slot type that sets the scale correctly on attach
And yes that works.
you could also do some jankishness with the entity type, make your own that enforces what you want at the entity level
I did it with the "ghillie wrap" of the m21 to get it to work with a turret barrel.
My method is the least jank.
I would just find my own C47 model and cut all the jank out completely
If it's not worth doing right it kinda isn't worth doing if you ask me.
yea
Figuring out problems like that is helpful though lol. IIRC there have been a couple posts in here about scaling prefabs/entities that could help via discord search.
Lol I read scale I already know someone's suffering
I had to write a hitbox system for a scaled character
But when said character gets on top of a vehicle, scale goes back to 1
I don't understand, why does this:
string printline = "[VehicleLimiter] RECONCILED: " + GetEntryDisplayName(entry)
+ " (" + (live + pending) + "/" + maxCount
+ ", live=" + live + ", pending=" + pending + ")";
if (updated)
printline += " UPDATED";
Print(printline, LogLevel.NORMAL);
Print this:
SCRIPT : string printline = '[VehicleLimiter] RECONCILED: LAV (1/1, live=1, pending=0) UPDATED'
SCRIPT : string printline = '[VehicleLimiter] RECONCILED: BMP (1/1, live=1, pending=0) UPDATED'
SCRIPT : string printline = '[VehicleLimiter] RECONCILED: M1A1 (0/1, live=0, pending=0)'
SCRIPT : string printline = '[VehicleLimiter] RECONCILED: T72 (0/1, live=0, pending=0)'
SCRIPT : string printline = '[VehicleLimiter] RECONCILED: AH6M_US (0/1, live=0, pending=0)'
SCRIPT : string printline = '[VehicleLimiter] RECONCILED: AH6M_RU (0/1, live=0, pending=0)
When it should've been:
SCRIPT : [VehicleLimiter] RECONCILED: LAV (1/1, live=1, pending=0) UPDATED
SCRIPT : [VehicleLimiter] RECONCILED: BMP (1/1, live=1, pending=0) UPDATED
SCRIPT : [VehicleLimiter] RECONCILED: M1A1 (0/1, live=0, pending=0)
SCRIPT : [VehicleLimiter] RECONCILED: T72 (0/1, live=0, pending=0)
SCRIPT : [VehicleLimiter] RECONCILED: AH6M_US (0/1, live=0, pending=0)
SCRIPT : [VehicleLimiter] RECONCILED: AH6M_RU (0/1, live=0, pending=0)
Because print is more of a debug function itself, and it will include where it came from on the print
You can do
Print((string)printline, LogLevel.NORMAL);
And it will do what you want
or just use
string printline = "[VehicleLimiter] RECONCILED: %1 (%2/%3, live=%4, pending=%5)";
if (updated)
printline += " UPDATED";
PrintFormat(printline, GetEntryDisplayName(entry), (live + pending), maxCount, live, pending, level : LogLevel.NORMAL);
Absolutely brilliant mate, thank you so much! Really been struggling adjusting from Arma 3 .SQF to these new Enfusion shenanigans... 😅
Loafboards 
But that’s cool tho
Anyone know what might cause these vehicle ghosts on clients when deleting them?
It seems rather random whether it occurs or not
//------------------------------------------------------------------------------------------------
//!
void OnSpawn(IEntity entity)
{
if (RplSession.Mode() == RplMode.Client)
return;
EventHandlerManagerComponent eventHandlerManager = EventHandlerManagerComponent.Cast(entity.FindComponent(EventHandlerManagerComponent));
if (eventHandlerManager)
{
eventHandlerManager.RegisterScriptHandler("OnDestroyed", this, OnSpawnedEntityDestroyed);
}
m_bSpawnQueued = false;
}
//------------------------------------------------------------------------------------------------
//!
void OnSpawnedEntityDestroyed(IEntity entity)
{
if (RplSession.Mode() == RplMode.Client)
return;
// If the vehicle was destroyed near its own spawn point, delete the wreck
if (entity && vector.Distance(entity.GetOrigin(), m_Owner.GetOrigin()) < MIN_DISTANCE)
SCR_EntityHelper.DeleteEntityAndChildren(entity);
m_SpawnedEntity = null;
}
It seems rather random whether it occurs or not
my 2 cents is that engine not have enough time,
add sleeps/timeout check again
Thanks, will give that a try
Worked perfectly after I added a delay, cheers
when I restart scenario from my mod, missionHeader from config.json is not loaded. does anyone know if it will be fixed?
is it real or only false info from log?
like this:
12:38:05.687 BACKEND : Loading dedicated server config.
12:38:05.687 RESOURCES : GetResourceObject @"{28DB635B47789055}Missions/MissionHeader.conf"
12:38:05.687 RESOURCES (E): Failed to open
12:38:05.687 RESOURCES (E): MissionHeader::ReadMissionHeader cannot load the resource 'Missions/MissionHeader.conf'!
Correct info. Mission header sounds like a leftover example from server config
i see this in my all DS logs but nothing error... runs for years, all mission header overrides with extra variables works fine
I want to post an event to my webserver when the server started with the map name, but how to I get the correct map name? Because I don't understand how arma reforger shows this in the server browser, looks like {gameMode} - {mapName} but how to get that?
Server browser says "Conflict - Everon" but what I get is:
{
"occurredAt": "1775480545",
"eventType": "round_started",
"mapName": "CTI Campaign Eden",
"gameMode": "SCR_GameModeCampaign"
}
is it possible to make a new line
m_wMessage.SetText "text1" \n "text 2"
its a scripted text
its for a layout where i update the text from a textWidget
Yes, m_wMessage.SetText("text1\ntext 2"); should work, at least if it's a RichTextWidget.
Has anyone had any luck with disabling street lights using a script? I want to simulate power outage
try to disable lamp component by script
'having a hard time to get my PVL script working correctly.
the script is a limiter on Attack Hellis, Tanks, Troop Carriers,
but when the limit is reached lets say on Attack hellis
Limit is 2 and the third will be deleted. thhat all fine but the issue is that it triggers the vanilla 300 sec cooldown.
that i dont want as i want only msg be display that the slots are full . so they can go directly spawn somehting ellse that does not have limiter.
soo do anyone have any suggestion wher i should look to make a workaround.
i have some ides but trying to figure out how to is the hard part
- Vanilla limiter activates on player but my script deletes the cooldown if a limited unit was spawned .
- Vanilla limiter is will not activate at all when , Limited Vehicles are gettign spawned.
so anny suggestions ?
Hey, I’m working on a handcuff system. The item is in a slot from the start, hidden by default. I tried showing it with a button or via animation, but with RPC it only appears for the police officer—other players don’t see it.
Does anyone know how to make a slot item visible for everyone or properly spawn it via animation with full sync?
Instead of implementing some external logic, you may want to look into the integrated budget framework instead, which is designed for preventing placement in the first place when some condition isn't met.
Is placement cooldown still clientside? High ping + ctrl = vehicle spam
If you need something replicated on all clients, you will have to go for a broadcast RPC or RplProp with onRplName for taking care of JIPs as well.
Built my app to handle requests with vecel because of "scaling"
Never again.
Charged for CPU+memory per request. Most expensive bill ever for a hobby project, lol
I use a VPS and self host everything. Node+Mongo and soon some redis for caching since I'll be increasing the data I'm processing by a ton
Yeah, switched to a hetzner box, self hosted redis+mongo, seems to handle 60rps fine, for now
You doing more real-time data with 60rps? Thats one of the first things I minimized through bulk updates, keeping under 1MB ofc
The data is relatively tiny, only ~12KB sent every 5 seconds to the API, but with each server that connects to it, means more concurrency across different servers.
Ig your use case is different than mine so reasonable to have higher rps. Although I did build out my backend in about the same manner. If we setup a new server I can just attach it to my api with minimal setup
may god bless you
which mod i can use as example,
that use chat intercept?
like user write !help then script launches?
there is that mod that let you change your ingame name
forgot the name
https://community.bistudio.com/wiki/Arma_Reforger:Server_Config#whitelist
Hey guys
Where is the data stored for WL, BL, and persistent storage?
Look at how the KickCommand or BanCommand works and work from there
Tho it will start with # as the prefix
my vibecoding mod won't work because
i loaded previous packed version from workshop,
instead of unpacked which under development🥹
My understanding of helicopters/vehicles is this:
When a player enters it, the server gives ownership to the player
This seems to work fine
however if the player exits, when they check rplComponent.isOwner() - they still see true
The server sees IsOwner as true as well.
(Testing on a live server)
So how to know who is the owner of a helicopter?
Not sure if this is a bug or skill issue...
i'd strongly advise you not to vibecode for arma reforger, AI for modding this game is JANK, it is only decent at stealing other modder's work
Seems like his goal is to load someone's mod into ai and scrape what it can from it too 
yes, you right 100% 🤣

Def recommend just reading qhat you can from workbench scripts that relate to what you need. Docs may or may not be up to date but they are just as useful even if they aren't if you're new to this.
honestly kinda...
the LLM enjoyers kinda ruined my will to keep modding the game ngl
Non vibe coders will always prevail though. Imagine asking ai for something, then having to rewrite all of it anyways. Just cut out the middleman 
Look through the showcases for one of the many AI tools, do not load other people’s mods
Enfusion script is easier than python once you learn it imo
😂😂 How does this impact you in any way?
llm is just like googling or using search in discord without waiting someone to answer, just waiting gpu answer
litterally
don't answer me guys, its waste of time, no need to spam this channel xD
@winter jay you are not allowed to distribute our code as is. Its against eula
ye, just use example how it implemented
I deleted your message
copy
Also
guess how...

Just in case you wanted to do it for that
If they are done by feeding our code, or other modders code and even configs. Then it is a breach and they should be dealt with
is there a remote console for peer tool diag executable? I know there is obviously one for the workbench itself, hoped to run some commands on the diag exe to try to troubleshoot/narrow this issue:
let's be honest they all are 😭
In no way whatsoever does it impact you 😂
..roger that
yes it does
but i won't be arguing that
i'll let BI handle my case ^^
We are not against AI
But the eula does not permit feeding code and data into ai
nah it's IP related with a mix of LLM
When you've spent 4 years learning all of this and someone comes along and diminishes your efforts with A.I. then you can speak on the subject.
i simply don't find link which beacon give me from first google page
https://www.google.com/search?q=reforger+api+code
https://github.com/BohemiaInteractive/Arma-Reforger-Script-Diff
https://github.com/BohemiaInteractive/Arma-Reforger-Script-Diff-Experimental
https://discord.com/channels/105462288051380224/1475507824044806344
Btw, does this count as violation?
How do you think the A.I. learned all of those things?
From the documentation? Lol
Yes
Based on a quicj read of the thread. It seems so
Will be great if you will take care of such ai-slop spreaders soon
I’ve been doing this since early A3 launch. We’re modding a video game. Every single hour spent on A3 was a waste. Outright hatred for something that is here and not going away is just misplaced.
Please keep it civil
👌
For now the issue is just game data infringements
Can someone help me with error when i launch enfusion ?
You're assuming there is hate involved for some reason. If you don't think that A.I. is diminishing efforts of humans then you're completely wrong.
@minor agate
The A3 aspect is kinda moot. You spent all that time learning it and didn't compete with A.I. Your efforts weren't diminished.
and now you spend months making a mod for a "modder" to reheat your mod in the llm microwave and republish it
There is a lot commentary that falls along those lines, perhaps not you. It absolutely does, but so has a long long list of developments throughout history. I’ve seen more people start modding in the last few years due to the ability to use AI to learn than the rest of my time combined. It’s a net positive.
It's not
The A.I. users aren't learning anything
Other than how to steal other people's shit and feed it to AI
I'm all for A.I. being used as a tool
As a replacement for actual thinking brains though, not so much
Using it to write a physics calculation that you might not understand is cool.
imma still say BI needs to maintain their own AI/MCP/whatever so they maintain control of the backend
AI is a tool, it’s not the entire puzzle by any means
That would still be a part of the issue.
Write vague sentence, click 3 buttons, now have mod.
No one is learning from that.
IsOwner() does not seem reliable for helicopters, so server and client can both own the same helicopter... unless there is some hidden method to "bump" a rplComponent, figure I should file a feedback ticket
You're not the owner of the heli
You have partial ownership
The server still owns it
Not a direct quote, but that comes from Mario
you are assuming people want to dive into the code and learn it. Some dont and wont, they want to make a mod of their liking and then run around Everon in their undies. Whether it sux or not is up to the community
Why does rplComponent.IsOwner() give true for client and server at same time, in a situation where it does not make sense (the player isn't in the helicopter anymore) Server seems to give and take back ownership from it's own perspective fine, but client (and more accurately my script depending on that check) has no clue
You don't decide to be an auto tech without learning how to work on cars.
Not much of a hobby if you don't really want to learn how to do it
I wanna be a doctor
I just don't want to learn the interworkings of a human.
Makes perfect sense
does that mean you have to have served in the military to play a milsim like Arma?
"Jarvis, how do I perform open heart surgery"
Ai will hallucinate its way to victory esp with enfusion script. It should not be a viable replacement to writing it yourself. Help with some calculations here and there tho should be it's intended use
My point exactly
working on physical objects vs AI
working a medical scalpel vs writing out hello world. not seeing your point
If you wanna do things YOU must learn to do them.
I can't bring a robot with me to the operating room to do the surgery.
but when can I call 1-800-Ask-Zelik? Some problems are too complicated to figure out individually
you can use this channel for help
when it comes to scripting
yep I know this, it outputs garbage and isnt of any use other than showing a general structure that is questionable
i've done that PLENTY of times, in fact it was even @river imp who taught me TF was a component and how to have it "instanciated". No need for AI when there is a helpful and passionated community.
Exactly as Hideout said
Folks, i was thinking so, but it is inevitably,
you need to embrace it and ride this wave
just look at older people,
they have trouble navigating basic phone,
technology will go log progress now
A big underlying problem is just not trying to learn for yourselves.
And requiring someone to help.
I've had my fair share of help
The wave infringes on Bohemias IP
But 95% of this I learned by putting in the effort of looking at vanilla things
Stuck? Apply 4head directly to brick wall.
Bang bang bang
Eventually you figure it out. AI just makes stupid people stupider.
This a long future legal battle that has not quite been decided on in any country
If we are talking from a general LLM like ChatGPT
"Bohemia AI, figure out what 1.7 changed that broke my 1.6 mod so i dont spend the next 6 hours looking at code because it interrupts my Dr Who marathon"
Outside the legality of it, if found youre violating something, that's a quick way to not be able to upload to the workshop
A part of game development is being able to debug. If you can't do that, you should look into learning it
99% of the time when bohemia "break your mod" you just need to adapt your method's signature.. if that takes you 6 hours you might need to consider doing smth else
or actually learning how to script
Is it possible to trigger LODs through actions or triggers that don't include distance?
sorry to interrupt
I debug ES better than I can write code for it. Taking the time to read docs and understanding the engine itself is huge
Sometimes it isn't even the script though. 1.6 broke my mod and I don't have any scripting in it, it was a prefab conflict
That's still a debugging issue
Compile, wait for errors, click on em and go
That can use something like AI to narrow down what the issue could be
Of you could learn how to debug
my guy, people have jobs and want to jump on Arma to play a game with a mod they made. not have to manually trace down bugs to fix what an update broke, if AI can shorten the troubleshooting/debugging thats a win.
dunning kruger
98% of the time the compiler tells me what's broken, the other 2% I'm missing a semicolon
My guy, if you don't wanna learn game development then don't make mods
Unfortunately not really how it works anymore
i want to get a six pack but i don't want to hit the gym or diet
Blast gear, you’ll get one
If a job requires the skills to get it, the hobby requires them as well
irrational, why spend 8 hours troubleshooting when AI can shorten it to 2 hours.
i think this conversation is currently just turning in circle
Why mod a game if you're not the one modding the game?
If it's outside your skill set, then you need to learn
It's been that simple the entire existence of our species
I spent 3 hours debugging the other night. I don't think ai would've found out that the constructor to my jsonapistruct had a typo in it
tbf the AI would've seen the void before the class name and would have assumed it is just a method
what if I am a master coder XXXL and want to watch Dr Who and just want Bohemia AI to find what the patch broke so I can update the mod so people can play it
watch Dr.Who and patch it when you feel like it
what if i watch an unhealthy amount of Dr Who and it'll take me 3 months to release an update, vs AI telling me exactly what is causing the conflict
I find everyones lack of Dr Who marathons concerning
that's fine, that's what's amazing about modding, do whatever you want whenever you want.
I postponed the work of one of my mod for 2+ months because i was busy with exams
It's a hobby. If you don't want to actively do the thing then don't.
no need to slopy pasta it with AI
Understanding how the engine works will help with troubleshooting wayyyyy more than relying on chat gpt to answer. After a bit you'll just know what the problem is
Think there is little point arguing here
@red cedar if you're a student put the video games down and go study /joking
i have a 90% average i think i'm doing fine
Rather not have the channel clogged with philosophy and more "oh my god" moments from devs on weird scripts
and i exercise very regularly too so my work / life / hobby balance is decent
Do whatever you want in your free time
you become the vehicle controller instead of character controller, server owns the vehicle and your inputs are suggestions to move it
i think the client owns the pilot compartment but not the entity
that's strange because I'm talking to the same rplComponent, it should not be owned by two things at the same time, not saying you are wrong but it kind of goes against the law of replication authority
Ownership is not the same as authority
You have authority and proxy
And only one of thse can be owner at a time
Think of owner as a modifier to the host type
Ownership can be swapped at runtime by the authority
I guess what is confusing me is that typically a gate like
rplComponent.IsOwner() should only return true for one machine, because there can be owner proxy and owner authority of course, but there should only be one. In my example, the server gives up it's ownership to the player machine, makes sense, but when it takes ownership back, the player still believes they are the owner.
So how to check otherwise other than through the rplcomponent
Because it takes time for the client to receive information about the change
You need to account for latency
What amount of time should be considered a bug
This is done for you
You can use the rpl callbacxk RplGiven/RplGive RplTaken/RplTake on any rpl enabled class
I'll look into that - but the issue I was having relates to the client not being notified over several seconds, I honestly did not wait more than 20 seconds in my testing, but it seemed to take a long time if it does eventually figure itself out.
You could also be checking the wrong thing for ownership
I'm checking rplComponent of the vehicle entity, on server I can see ownership change instantly along with client recieving ownership via periodic IsOwner check, it was only when the player exited the vehicle the server would evaluate as owner, while the client would also be evaluating as owner. I'll check soon to see if the client ever stops becoming an owner when exiting the vehicle tonight or tomorrow.
Dont do periodical check for this
Use the callbacks
Whats the maximum number of decals on screen?
Wow decals have pretty good performance
This gives me an idea
Does entity need to have a bounding box to show up in Queries?
And if that is the case how do I get a bounding box for an entity without a mesh, since the manual definition in the meshobject doesnt make it show up in queries
Yeah it appears it needs some kind of actual mesh 🙁
//------------------------------------------------------------------------------------------------
//!
void OnSpawn(IEntity entity)
{
if (RplSession.Mode() == RplMode.Client)
return;
Vehicle vehicleEntity = Vehicle.Cast(entity);
EventHandlerManagerComponent eventHandlerManager = EventHandlerManagerComponent.Cast(vehicleEntity.FindComponent(EventHandlerManagerComponent));
if (eventHandlerManager)
{
eventHandlerManager.RegisterScriptHandler("OnDestroyed", this, OnSpawnedEntityDestroyed);
}
m_bSpawnQueued = false;
}
//------------------------------------------------------------------------------------------------
//!
void OnSpawnedEntityDestroyed(IEntity entity)
{
if (RplSession.Mode() == RplMode.Client)
return;
// If the vehicle was destroyed near its spawn point, delete the wreck
if (entity && vector.Distance(entity.GetOrigin(), m_Owner.GetOrigin()) < MIN_DISTANCE)
{
GetGame().GetCallqueue().CallLater(PerformDelayedDeletion, 100, false, entity);
}
m_SpawnedEntity = null;
}
void PerformDelayedDeletion(IEntity entity)
{
SCR_EntityHelper.DeleteEntityAndChildren(entity);
}
So I noticed with this code, the OnDestroyed event seems to occur when any of the hitpoints of the entity are destroyed (like headlight, window, rotor, etc)
Is there a better way to check the destroyed state of a vehicle?
I mean you get the entity in the callback
How should I check if it's actually the one I am after though
I am not really sure how to filter it
A conditional where you check if the destroyed entity is the entity running the script (or the entity that you want)
I'm not sure I understand what you mean sorry, I am guessing I might be able to check if I can cast to Vehicle maybe


