#enfusion_scripting
1 messages · Page 3 of 1
||You have to do a rain dance in game and spawn a black hole||
Do I have to do this to be able to troubleshoot replication?
Anyone knows why my custom game mode does not have gamemaster on dedicated server but it does in play mode in world editor ? How can I fix this ?
Make any progress on this? I'm running into a similar issue
Seem to be missing something on the SCR_MapJournalUI front and processing the faction info/changes
Reason: NULL pointer to instance. Variable 'm_wEntryLayout'
Discord no likey copy/paste
What is the best way to instantiate a global class in the server that keeps track of entities spawned by users?
A system
bumping this; seems necessary for serverside verification to know where an rpc came from
qbq: game master server context actions have no way to tell which player performed them; im trying to make sure a gm has a particular set of permissions
a last resort is modifying actionperform rpc to include sender id but that's not very safe
i know an rpc must come from the owner.. so maybe in this particular case figuring out who the owner is?
Yes, because the entity that the Rpc comes through on is owned by the player
For example if it's the player controller entity, you can simply fetch its player id on the server
If it's not the player controller entity.... use the player controller entity (or a component on it)
that makes sense ty
however in this case the rpc comes from SCR_BaseActionsEditorComponent and then on the server it calls action.Perform.. not sure how to find out the editor entity that called it from inside Perform
maybe that's the part i need to modify though
that components on SCR_EditorBaseEntity which is probably actually the EditorModeEntity.. didn't realize there was one per player replicated
from SCR_BaseActionsEditorComponent you could look into GetManager().GetPlayerID() serverside
ooh yea and i see the action itself has a m_ActionsManager that is the BaseActionsEditorComponent
thanks!
scripts/Game/ACE_Medical/HitZone/SCR_CharacterResilienceHitZone.c:21 Function ComputeEffectiveDamage
scripts/Game/Damage/DamageEffects/CharacterDamageEffects/SCR_PhysicalHitZonesRegenDamageEffect.c:59 Function EOnFrame
18:24:32.645 SCRIPT (E): Virtual Machine Exception
Reason: NULL pointer to instance
Class: 'SCR_CharacterResilienceHitZone'
Function: 'ComputeEffectiveDamage' LITERALLY EVERY SECOND
this is what i ended up doing. m_ActionsManager wasn't always available but now i can GetPlayerID in Perform in any action
modded class SCR_BaseEditorAction
{
SCR_BaseActionsEditorComponent m_LastCaller;
void SetLastCaller(SCR_BaseActionsEditorComponent caller)
{
m_LastCaller = caller;
}
int GetPlayerID()
{
if (m_LastCaller)
return m_LastCaller.GetManager().GetPlayerID();
return 0;
}
}
modded class SCR_BaseActionsEditorComponent
{
override protected void ActionPerform(SCR_BaseEditorAction action, SCR_EditableEntityComponent hoveredEntityComponent, set<SCR_EditableEntityComponent> selectedEntityComponents, vector cursorWorldPosition, int flags, int param)
{
action.SetLastCaller(this);
super.ActionPerform(action, hoveredEntityComponent, selectedEntityComponents, cursorWorldPosition, flags, param);
}
}
How do you give the helicopter unlimited rockets?
Hi, no unfortunately i was not able to solve the issue and dropped this idea at least until I get better at modding
I’m pretty sure it’s a timing issue. I had to introduce a lengthy delay to get around it
Oh, that sounds logical
As the problem is related to ui
Get on the ace discord and tell them.
surely they must know lol
Yeah, it's not like any of us would. Unless we made the mod or used it.
Fresh day, fresh thoughts. Looks like you need dedicated RenderTargetWidget for this setup to work. ItemPreviewWidget seems to be hardcoded to work only with ItemPreviewManager.
Now trying to get RTTextureWidget to display anything
I have a prefab weapon in the world and a script using EOnActivate (and print statement) which doesn't trigger the first time I pick it up or equip it from the ground. If I switch to another weapon and then back to it, it triggers. If I drop it on the ground after having previously picked it up, it will trigger EOnActivate without problem. Just seems to be that first pickup where its not popping EOnActivate. Any ideas on if thats common and if I can do something to resolve it? Thanks
[ComponentEditorProps(category: "GameScripted/Misc", description: "")]
class ZEL_OnActivateComponentClass : ScriptComponentClass{}
class ZEL_OnActivateComponent : ScriptComponent
{
override void EOnActivate(IEntity owner)
{
super.EOnActivate(owner);
Print("The Thing Activated");
}
override void EOnDeactivate(IEntity owner)
{
super.EOnDeactivate(owner);
Print("The Thing Deactivated");
}
}
Not sure what you've done but, this works correctly.
Having an issue with a Gadget Prefab, its a laser designator, on toggle active it should send a raycast to get the point aimed at and send an RPC to the server to execute some server side logic, the issue is that the raycast requires the camera but "GetGame().GetCameraManager().CurrentCamera();" is returning null
Does it work without peer tools (just hit play in world?)
Yes, it fails on dedicated server tool or peer tool
Cameras do not exist on the server at all. You need to raycast on the client
or obtain the origin point and direction on the client, and then raycast on the server based on that if it’s sensitive (as in: never trust the client)
how to fix this ?
SCRIPT (E): Virtual Machine Exception
Reason: Failed to read save-data from component 'B_PlayerIDComponent' using 'B_PlayerIDComponentSaveData'.
Class: 'EPF_CharacterSaveData'
Function: 'ReadFrom'
Stack trace:
Scripts/Game/EPF_EntitySaveData.c:123 Function ReadFrom
Scripts/Game/EPF_PersistenceComponent.c:177 Function Save
Scripts/Game/EPF_PersistenceManager.c:342 Function AutoSaveTick
Scripts/Game/EPF_PersistenceManager.c:929 Function OnGameEnd
Scripts/Game/EPF_PersistenceManagerComponent.c:50 Function OnGameEnd
Scripts/Game/GameMode/SCR_BaseGameMode.c:764 Function OnGameEnd
Scripts/Game/SCR_BaseGameMode.c:8 Function OnGameEnd
Scripts/Game/game.c:811 Function OnGameEnd
your save data is corrupted, or data format has changed after mod update and your save data is incompatible. wipe the save
@livid forum
Thats what I have setup pretty much. ```class SNEAKY_LungeMineAttackComponent : ScriptComponent
{
override void OnPostInit(IEntity owner)
{
super.OnPostInit(owner);
Print("----- POST INIT -----");
}
override void EOnActivate(IEntity owner)
{
super.EOnActivate(owner);
Print("----- ON ACTIVATE -----");
GetGame().GetInputManager().AddActionListener("CharacterFire", EActionTrigger.DOWN, LungeMineAttack);
}
override void EOnDeactivate(IEntity owner)
{
super.EOnDeactivate(owner);
GetGame().GetInputManager().RemoveActionListener("CharacterFire", EActionTrigger.DOWN, LungeMineAttack);
}
void LungeMineAttack()
{
Print("----- IMAGINE if this worked -----");
}
}```
Video showing it doesn't activate on initial equip but will after weapon swap. https://streamable.com/gurliz
ur using a obv declared test mod, I will fix it once im back home in about a week. This broke with 1.3
Is there a way I can get references to all currently present characters or AI agents, without storing them myself on creation?
hmm. Tested the component on an m16 and it triggers the first time I pick the weapon up. I guess something regarding how I built my prefab is missing/incorrect to cause EOnActivate to not trigger for initial equip action.
how are you supposed to combine an event mask, if I want to have access to the EOnInit and EOnFrame lifecycle methods at the same time? Doing a bitwise AND on it doesn't work.
SetEventMask(EntityEvent.FRAME & EntityEvent.INIT);
|
or you can just call it two times for each event)
so normally when someone exits the server it will show group1 reason9
this prints sometimes when exiting server and then hangs on the arma logo until you end the process
14:06:40.993 RPL : IReplication:: Finishing...
14:06:41.026 RPL : rpl::Pip::ProcessNetToGame
14:06:41.026 RPL : IReplication: Finished
14:06:41.026 RPL : ClientImpl event: disconnected (identity=0x00000000), group=0, reason=0
14:06:41.026 RPL : Pip::Destroy
that printed in client
this printed on server
@torn bane do you know the limit of how many items can be saved in the database before performance takes a hit?
or wierd things occur
how many items would it take to flood replication?
specifically 'Items'
also what is the data limit from server to client before rpl takes a hit
I do not know, but especially with many items of the same type it is better to implement virtual quantities. instead of having 100 records that all say its a full mag
does anybody know the data limit before clients cant handle rpc's
if my client is trying to load 3k items from database is that enough to flood rpc?
How does one make a multiline string?
Afair it was 4kb for a single sync message, do not remember anymore, the game will not let you send it and print in the error log. but you have no way to measure how muc htraffic you cause andd sending this much usually means a big performance drop in those frames
\n but the widget has to respect it. if it is rich text, then <br>
No like in code
hello
world
";
does anybody know the actual limitations of rpc of this engine????????
im kinda sick of playing guessing games here
im sure many people are
you guys got documentation on almost everything else.
And what would you do with this information? I already told you that if you hit the limit the game will tell you. The limit can change (it has already in the past 2 years). You are not supposed to even come close to this limit ideally, especially not for spawning entities. Eeach entity creation is their own rpc already. You can spawn as many entities as you want in a frame, they will all be synced to a client, but it will lag everyone out.
my problem is the limit being hit with no reason behind it. no pointers or errors giving me ANYTHING to go on
i have wiped my map clean of everything and STILL get rpc flooded
is it the size of my map? is it some vanilla entity that was deprecated and still exists on the map?
what do i do?
what would you do?
You get rpl flooded even if you just load onto your map? Are you sure some script is not loading dynamic entities after the world was loaded? Because world entities itself have little replication, only if they got changed since load.
Right before the line break, type \
As said in the replication bootcamps. 4kb just makes the rpc reliable.
Also you can measure traffic with the diag executables, on the networking/replication diags.
@gloomy lynx my guess on your issue, based on the only case i have seen something like this before is perhaps having custom trees or bushes in your map that have rplcomponent set to runtime.
Or that have an rplcomponent
Just remove it if so
ok ill do some searching, thank you
@minor agate any thoughts on this issue? Unsure what to check at this point.
Inventory is virtual afaik for a while
(Items are not kept spawned unless visble for a while now)
So if you took it directly to inv, those things wont be called.
It activates on the others as it makes it active for whatever reason
Dont bank on that as a signal that its being used
Can I put the same database name for different worlds with persistent database framework?
I doubt it just curious
Like for players items for instance.
Hows progress on making servers not use 100 TB bandwidth per month?
Depending on what you save yes. If none of it is map specific.
Excellent thank you. Yeah I'm just talking about saving items and the player can retrieve them in their inventory or from a locker or something in a different world
the 'others' you mean the base game weapons? Because they're calling it reliably the first time I equip them from the ground. No matter what I do for my weapon (equip into hands or onto back and then switch to the weapon) I need to cycle to another gun and then back to my weapon for it to OnActivate. Even pulling it out of an Arsenal I need to cycle to another gun and back to it.
The problem is that I was relying on this OnActivate method for my 'attack' functionality (detecting when player left clicked or hit whatever applicable controller button). Can I somehow force the component to activate within OnPostInit manually? Not sure if that'd fix the problem but it's the only thing I can think of at the moment.
But why do you need EOnActivate to begin with?
That is not clear still.
It's not a method that tells you if a item or entity is being used.
So it's unreliable for that if that is what you want
EOnActivate is en engine event used for knowing when the engine is ticking/processing the entity periodically
It has nothing to do with items, or anything else
It can get triggered by many other things
I explained in second paragraph. I was using it to listen for player 'attacking' input which I was going to then use for setting up the attack with this weapon. Because my weapon isn't a gun I have to figure out a way to manually trigger an attack.
The reason I picked it was because I inherited from Scriptcomponent and it looked like the most reasonable method for what I was trying to do.
Wrong usage then
It will give you more problems than this
Do not activate it manually on OnPostInit too. You will cause extra strain on the engine
if someone can dig into my mod and figure out my flooded issue, ill make you any car\truck you want
You probably will need to mess with Player Controller or Character command handler
If you want to implement custom weapon type of sorts
Are components / entities supposed to have behavior? Or do I create empty entities that hold components which are then queried and modified by systems. Cause all of this looks like ECS but there's behavior within components and entities.
They are, they are just misused.
In general, if you can;t just do it as proper ECS
And do the behavior/logic on game systems
Unfortunately the vanilla scripts are not always the best practices or implementation
Anyway things will somewhat work
you will only just run into issues here and there if not, or tangling of logic and not being able to batch things
OK. I'll start looking through that tonight and see what I can come up with. Appreciate your time bud.
Yeah I mean I was looking at the docs and the guy was using lifecycle methods of a entity within a component
Yeah, we kinda want to get rid of that 😅
@edgy field In the replication modding bootcamps we used systems
there are two of those
That didn't really make sense to me cause SetEventMask expects an IEntity. But the EOnFrame is being used in the component
In the Animation Modding Bootcamp #3 I did yesterday, I explained how to mess with character handler and implement custom logic, also how animation graph <-> Scripts and controlelrs work and pointers on how to even implement new mechanics and controllers
And now somehow the component is relying on the Entity's lifecycle methods?
It should be uploaded tomorrow.
Component => causes entity to tick when using the EOn events
Better to do it through systems
I will
Faster, more reliable and can be systematically done
Idea, entitites just to have a definition of something in the world, and transform info.
Components to tag behavior or data into the entity
ya I was waiting for it to come out, I missed the first half of the presentation the other day unfortunately. I'll definitely check it out when it gets uploaded. Admittedly should have went with a gun for simpler implementation rather than creating something from weapon_base but I'll figure it out.
System that get these components registered into
and performs behavior on them
Perform the behavior on the systems themselves, either through other classes managed by it. But avoid doing any logic on entity or component classes themselves
Use components only for data, and replication of said data (RplProp)
Ok I will, it just looked like everyone was doing it the behavior-within-entity way
Thing is that when developing reforger, Game Systems (The legacy way before World Systems) was not fully prepared or even there.
So things were done with what we had
But now we have them, and a more robust system impl to use is coming even
Again, you have the tools for that in the Diag game and server
also on WB
open diag menu, and mess with the Replication and Networking debugs
You won't see it on normal ones
I have a feeling that someone is just attacking your servers through a game exploit like it has happened in other games
so spamming some bogus datapacket that looks like a rpc call?
If it's really not a messed up mod
Yeah
Anyway stop flooding the channels here
I already told you that I would check

hi! A silly question but, can a vehicle drive by premade coords. Like a train, following the railroad vector coords?
Do any of you bohemia devs know anything about activation conditons / triggers for scenario framework being broken in 1.3? Been having issues and heard the same thing from some others.
can't seem to get anything to trigger unless its set to oninit
Hey pal I think we cap out at 6-8TB a month 8^)
Can I do this on a server? Performance on WB doesnt matchup to performance in servers due to having data from the players that cause flooded/stalled crashes. Have been trying to figure out how to debug replication for a while now, its been happening a lot and then a LOT more after the 1.3 update
These debugs are not enabled or even accessible at all in normal server and normal clients
You have to use Diag client and diag server. Or workbench
so say me and him are getting attacked, what can we do?
if its not anything on our end
😅
We do not do the reasons so trying to fight it back is useless
Just wait on it
A lot of things can cause that
That is why you do not get a report telling you what did it
Just something, somewhere flooded replication and the system was unable to handle it so it just dropped the connections
pardon my frustration but unless we get one of you guys to look into it we are kinda screwed with no prints for whats causing it
But I already told you that I would check
and theres no way to tell what that something is? I can't diag/debug in workbench because it happens under certain conditions in a running server with 60+ people on it.
Stop asking for it or messing with spamming it here
curious on the answer, if you can remember add me to the answer as koth reforged has very easily flooded issue going above 90players (kinda mid joining in the discussions so maybe im totally irrelevant if so plz ignore)
Run a diag server
and diag client
Then you could.
Just beware that it will be open to hackers, but for testing is fine
So I can run the diag server on my DS and it'll run normally so players can still connect into it?
Onyl those that are running the .exe that has Diag on it
im not saying this out of impatience im saying it because if its the case that many thing can cause it WHY is there no prints for it. im sorry if it seems like im being forcefull but its a genuine question
So i f you want to test with your community, tell them to launch that .exe
instead of the non diag one
thats where the problem lies, I can not replicate the kicks without them and 90% of our community are xbox players
Because there is no way to track that
And if we did, the performance of the replication system would be way worse
and also the game's
if we had a option somewhere in the game mode to turn it on and off couldnt that work? turn it on to debug, turn it off to save performance
Anyway I am getting impatient about this now, I was going to check it on free time, so do not push the limit.
No need to still bring it up if you are told that it will be checked
or is there anyway to utilize the diag classes in our mod to debug this?
Best way is to report it to us, will be easier.
Debugging replication is not easy and it is not modding friendly
It's easier if we do it ourselves and debug from the CPP side
Bet, i'll stop asking questions now and let you do you. Thank you for the input
You can see some things, like how much data is being sent
But you can't see what classes and such
In our case, we can as we have more control in internal binaries. That actually make the game slower by a lot
And those things won't be released to modders as it aids to hacking and other things
They are dangerous.
Sorry another question, when sending you guys the information needed, where can I get this? Since it doesn't actually crash the game/server theres no crash guid being given
Just your exact setup
And the logs you get
If it;s big issue community wise. We can do a playtest inernally and see if we can replicate it
Okay thank you, i'll start getting the information together to send it off, best to send it to general support or there a more focused area?
nvrm i see the Feedback tracker is where
@open pier @gloomy lynx With Rpl Diag you have available if you do what I told you.
On a client connect to server. I have two clients connected to a diag ds server.
Data from each connection on the server
Outgoing rpcs
same with byte usage
ok so if we do that and we see a ton of data what do we do next
In this menu
If an Rpc there is being called a lot.
Just check what calls that Rpc in your mods
That is about the best you can get from modding side
@gloomy lynx @open pier The RPC ones are relative to the client that opened this debug
If you want to check in on the server, then launch a listen client to act as the server
Just launch the Diag client with server param, and use it as normal server
It will launch a client that you can play on, that is also the server. then you can use that visual debug there
alright ill try it out
Yee time to get a diag server setup, thank you Mario
@gloomy lynx @open pier You will have to make them connect through IP btw
Also, only PC
So just direct connect to it as it wont show up in the server list?
bet
Hey, I have a gadget (LaserDesignator) that onToggleActive I need to calculate the position from the gadget 2D Sight where it is being aimed at but on Dedicated Server Tool I can't access the client camera or chimera character from the gadget component
So Cameras don't exist on the server, right, but the logic is supposed to be running on the client or having my logic on the components "onToggleActive" on a modded SCR Gadget Component runs on the server?
How can I guarantee that a component is client-side so I can calculate the raycast and then call the rpc to execute the server logic?
Cameras can exist on server, but only in the case of listen client (When server is both a playable client and server)
In normal server, no render so no cameras
And expect anything render related to not be there
https://community.bistudio.com/wiki/Arma_Reforger:Multiplayer_Scripting
This Modding Boot Camp seminar was originally held on the Arma Discord Server on January 23rd, 2025.
In this session, we explore the fundamentals of replication within the Enfusion Engine, highlighting key concepts and common challenges. Through detailed examples and clear...
https://community.bistudio.com/wiki/Arma_Reforger:Multiplayer_Scripting
This Modding Boot Camp seminar was originally held on the Arma Discord Server on February 5th, 2025.
In this session, we explore advanced replication within the Enfusion Engine, continuing from the fundamentals shown in Boot Camp #5.
TIMESTAMPS ARE WIP
0:00 - Intro...
I watched those :/ is just a bit confusing right now
You would want to check if you are authority
Then perform logic that is authoritative there
We can;t really tell you the exact proper way without having your code
Depending on case, how to do it changes.
Any news on the samples used in the advanced one being released?
Ok so if you're able I'll give a high level overview of what I'm trying. I have server-side logic that can spawn some prefabs. Then I have a prefab of Binocular that I need to behave like a laser designator, so when the player aims at some point and presses a key, the server logic gets executed.
I think the main issue is that all my logic is on the RangeFinderComponent that extends from SCR_BinocularsComponent and is attached to the binocular prefab, so I can't tell where is my logic running
We'll release them along with the animation projects
I was thinking that anything outside an Rpc ran on the client
ofc all my recent logs are filled with REST API errors, need a keepalive on my web server for when the server can't come back up :c
Gotta wait for some fresh logs to put in the bug report
most things run on both server and client unless you use rpcs or manually check rplcomponent
depends what it is but for example you add a component to an entity on the map it'll run the components lifecycle separately on both
ie EOnInit when the server starts up, EOnInit when a client streams it in
Interesting, so looking up I found that in gadgets the method OnToggleActive(bool state);
is an Event called from SCR_GadgetManagerComponent through RPC request so that's probably the root cause of my issue, it would never run client side logic as its meant to sync states
ok did all this and used my main rp mod, spawning in corner of map no ability to respawn, on a actual dedi server we spawn normally any ideas what could be wrong?
this is local
this is server
im not asking whats wrong by showing you those screenshots, thats just whats going on
Not true
It depends on if those events were enabled on post init or such on auth, proxy or owner
@dapper warren
Best way to test, without going down the chain of calls, is to run DS tool
Then conenct WB script editor to server, see if it gets called there
then connect WB script editor to the client, and see the same
Or just make it print something, and check script log of both
I showed a bit how to do this on the previous anim bootcamp 2 days ago
3rd animation bootcamp was also about modding in scripts
Yes, I was there on anim bootcamp 3, learned how to use it and its changing everything so I just created an inputProxyComponent on the character to handle the logic of calculating the point, I think I'm on the right track, I guess at first I was just looking where to hook the spawning logic and as it worked on the normal workbench play I was thinking it was right but the more I learn it changes things
Yeah, this is why I recommended to avoid testing in WB game
and just use the DS server + client environment
It's just more reliable, WB won't cache things on it
And it's more akin to what players in MP will experience
also you can easily tell apart what things are authority and proxy
Unlike in WB + Peertool where server (WB game) can be Auth, proxy and owner
in the case of the serverdiag.exe where does it save the edf database?
cant seem to find it
That is not official mod.
Idk where Arkensor made it save things at. I have never used it
Probably on some other profiles folder for it
usually its in the profile but it looks liek the diag.exe doesnt create a profile folder
Yes that can be very confusing, now by connecting the wb editor with the debuggerPort shows different prints as in the console window that's running on the server - I thought the server logged even client prints but nope!
Did you run it through WB DS tool?
yes
If so then it might just default to WB's
Unless you told it to use specific profile's folder
Also remember the hint I threw there
IF all you need is to see prints, then you can go to the client game
press left shift + ~
then you get an ingame console log showing
Then you do not have to hook in and out the script editor from server to client, or to client A to client B
It will open that
Thanks!
Are the scripts used in the VFX video from 2 years ago outdated has the language been altered or updated since then? Functions changed?
He answered it for me this morning on here. I'll find it real quick
Er not him but somebody
Server/saves/profile/.db/yourdatabasename
.dB is hidden folder
@gloomy lynx
thank you!
Lol yes assuming you've enabled the events
Would it be safe to get RplId from RplComponent on an entity that registers as a component to a system?
I am doing component.GetOwner().FindComponent(RplComponent)
RplComponent exists but rplComp.Id() = -1.
With hud manager layouts, I should be able to create widgets inside the infodisplay script right?
I’m trying to create popup widgets whenever certain actions happen. But I can’t seem to get them to display. When I manually drop them into the main hud layout they appear as they should inside of workbench. My rpc is getting called as well.
Also not at my computer right now so I can’t post the code. Just curious if anyone else has dealt with it. Maybe looking at the player kill/join feed script might be similar.
SCR_NotificationsLogDisplay? That’s the one that shows kills, player joins/exits and other info on the right side of the screen?
can someone that uses default values and JSON like this in their scripts put this on the issue tracker, please? regression / bug since 1.3
How do I get my json bool to not convert to 0/1? I need it to be false/true
Are you using JsonApiStruct?
Yeah

Currently I just set it to -999 and dataString.Replace("-999", "false");. Clearly the intended way 
Use SCR_JsonSaveContext since JsonApiStruct doesnt parse JSON correctly and breaks over time
bool testValue = true;
SCR_JsonSaveContext ctx = new SCR_JsonSaveContext;
ctx.WriteValue("m_bTest", testValue);
Print(ctx.ExportToString());
// SCRIPT : {"m_bTest":true}
And then SCR_JsonLoadContext to load it
Another issue with JsonApiStruct is it parses 900.0 as 0 for float fields
Lol
Why do I even read the wiki if its all unusable info 💀
And due to arbitrary buffer limits JsonApiStruct always breaks when the server runs for a few hours with max players
So at some point it will just stop working
And you'll be wondering why
Thats the important info that need to be on the wiki
Users can’t be trusted to update the wiki, but that’s besides the point of this channel haha.
I’m working with map markers and figured out that I could set global display to true on server, and local display to false on clients. I’m having a great time turning them off but I’m not able to turn specific ones back on since target is set by server thus doesn’t exist on client. Not sure if there if any optimal way to do what I want with them (turn them on locally based on custom parameters).
I ended up getting around it by modding a Rpl setter/getter function on the map entity class, but avoiding that would be good
class PrintDistanceFromPlayerSystem : BaseSystem
{
override static void InitInfo(WorldSystemInfo outInfo)
{
outInfo
.SetAbstract(false)
.AddPoint(ESystemPoint.Frame);
}
override void OnInit()
{
Print("OnInit");
}
override void OnUpdate(ESystemPoint point)
{
Print("OnUpdate");
}
override void OnStarted()
{
Print("OnStarted");
}
}
Why is my system not running? Do I need to instantiate it somewhere?
Yes, add it to the game system config
Only classes that have rpl layout (Rpcs, RplProp, RplSave/etc pverrode) get registered into replication
That entity has to rpl layout so it is not registered
Same thing for components, RplComponent being there does not make entity and components be all replicated
Only those that have explicitely tried to define replication layout
We explained it on the replication bootcamp too
Yep, it’s a radio with RPC stuff I just didn’t realize that there was something wrong with my code concerning getting RplId
So that issue was fixed on my end
Continuing in the topic of replication - I know a ScriptedCamera would not exist on the server but can I store its transformation like position, angles and replicate that so every client that views the camera views the "same" camera?
I've created a system settings config, added my system to it, configured the system point to match the one in InitInfo, added my config to the system module settings configs and then selected it under the play button. For whatever reason, my system is still not running at all, not even the constructor. Aditionally I'm not sure if by default the SystemsSettings config class is supposed to detect the system points set in InitInfo cause it doesn't. I was following the docs in WorldSystemDocs.c, not sure if that's still up to date.
Uh I had that issue, what worked for me was overriding or inheriting from chimeraSystemsConfig and restarting the workbench - reloading the world, so instead of creating your own Systems conf, you use the one that's loaded by default, add your system to it
I've tried restarting the workbench, I can't imagine why you couldn't use a custom systems config.
Maybe I'd like only for certain systems to run.
Don't really wanna inherit from the base config.
yes, I'm not sure why it didn't work that way for me
In the docs they use a custom systems config, but following step by step I could not replicate
Could help me find out how to set 3 of my variables to be configurable by the server's JSON?
RENDITION_CHANCE Chance of the last agent to surrender 0.75 (75%)
RELEASE_DELAY_MINUTES Time until he tries to leave the surrender 4.0 minutes
RELEASE_CHANCE Chance of leaving the surrender after time 0.30 (30%)
Overriding it did actually work, but that's not ideal. I wonder if its an issue with the config selection when hitting play.
Looks like, when I selected the custom config the default was deselected but on the game it looked like it was still active and mine wasn't
Also, is there a way to query for entities using multiple components? Vanilla system do this thing where they have a register and unregister function and use that to keep track of components but that only allows for a single component type, is there a way to do something like this?
QueryEntitiesWithComponents({PositionComponent, VelocityComponent, ExplosionComponent})
If you had like a movement system then, you'd query these in the OnUpdate method and then do whatever
Where can I get some help about crash report? I have once again hit the common Crash WB With Zero Logs situation
Is there a non wbAPI method to get the terrain size / bounds?
I know I can do world bounds, but these usually don't line up well
Actually maybe I can try the bound box of the terrain entity
Edit: No luck either, it just returns zero vectors
Edit 2: I found that the MapEntity has a Size() and Offset() method, these work
Yeah you can replicate vectors pretty easily
if you can find a way to get that data on server
Someone can help with this Error ?
Just like it says, you can't overload EOnInit
I was waiting to know if anyone knew another way for me to run the function
By not overloading it
https://reforger.armaplatform.com/workshop/6265238BFD2AC936-CentralEconomy
anybody know how to activate it?
can somebody help to get worked loot spawn
EOnInit already exist, meaning you need to:
- override the function
- specify the same function parameters => the things inside the ()
Example:
override protected void EOnInit(IEntity owner)
{
super.EOnInit(owner);
// My code here
}
"overloading EOnInit" mean you are not respecting the expected parameters to keep it simple
anyone getting infinite hang on logout of a server, hangs on arma logo until you end the process
Is there a prefab / component / script I could look at to get started if I want to make deployable tent pickups.
Like you pick up the tent and can place it on the map from your inventory
There's a usage on his github https://github.com/CashewSan/Central-Economy/tree/main
Has anyone had success with getting the vanilla pilot turret working with machine guns? I've managed to get it going but there seems to be a desync / registration issue with multiple guns. Only one gun seems to register across the network properly and stays in sync while the other one(s) do not. Figured I'd ask before digging deeper... 
Can we request Wiki on how this systems works as well. Would be amazing ❤️ ^
make the guns one with two muzzle components - the way it was done in the past lol
Otherwise not sure haha
that seems kind of lame because both are separate entities being attached to the rack system
It's like the second entity doesn't register across the network or something idk 
I get that the system was primarily meant for rocket pods but surely they would have the foresight to see some idiot like myself would try to rig it with machine guns..
just fyi @west prism, and as this has been talked about in my Central Economy thread #1301291009635909664 message, currently those instructions on GitHub are outdated and will be changed. Just haven't gotten around to it yet, best instructions are available on its workshop page https://reforger.armaplatform.com/workshop/6265238BFD2AC936-CentralEconomy
If you have any further questions, please ask in my thread I linked 😄
Question, with AttachmentSlotComponent, how do I set which other attachment slot it obstructs? Do I have to do that in script somehow?
Hoping someone here can save me from this pain as I feel like I have no idea what I'm doing at this point but it's the effort that counts right?
class TRF_VoNOverrideComponentClass : ScriptComponentClass {}
class TRF_VoNOverrideComponent : ScriptComponent
{
const string VAR_CONFIG = "{1C14FBA390717FC3}Sounds/VON/VON_DIRECTION.conf";
const string VAR_LEFT = "VON_Left";
const string VAR_RIGHT = "VON_Right";
override void OnPostInit(IEntity owner)
{
super.OnPostInit(owner);
if (!Replication.IsServer())
return;
SetEventMask(owner, EntityEvent.INIT);
}
override void EOnInit(IEntity owner)
{
Print("TRF: Initializing VoNOverrideComponent", LogLevel.NORMAL);
SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(owner);
if (!character)
return;
// Check if this character is controlled by the local player
PlayerController pc = GetGame().GetPlayerController();
if (!pc || pc.GetControlledEntity() != owner)
return;
bool hasHandheld = false;
bool hasBackpack = false;
IEntity child = owner.GetChildren();
while (child)
{
SCR_RadioComponent radio = SCR_RadioComponent.Cast(child.FindComponent(SCR_RadioComponent));
if (radio)
{
EGadgetType type = radio.GetType();
if (type == EGadgetType.RADIO)
hasHandheld = true;
else if (type == EGadgetType.RADIO_BACKPACK)
hasBackpack = true;
}
child = child.GetSibling();
}
float left = 0.0;
float right = 0.0;
if (hasHandheld)
left = 1.0;
if (hasBackpack)
right = 1.0;
AudioSystem.SetVariableByName(VAR_LEFT, left, VAR_CONFIG);
AudioSystem.SetVariableByName(VAR_RIGHT, right, VAR_CONFIG);
Print("TRF: VON Stereo Set - Left: " + left + ", Right: " + right, LogLevel.NORMAL);
string hintText = "Stereo applied:\nHandheld -> Left = " + left + "\nBackpack -> Right = " + right;
SCR_HintManagerComponent.ShowCustomHint(hintText, "TRF VoN Override", 5.0);
}
}```
I've split the von.sig out into two channel and enabled channel volume, I have variables set, and they work when the variables are set as "constant" and I give them a value but now I'm moving the variables to External so I can affect them via scripting.
I've created the above script and added it as a component to Character_Base.et (No idea if that's even correct) but it's not doing anything at all.
Trying to make this work based off the message here in Audio from LAxemann: [#enfusion_audio message](/guild/105462288051380224/channel/976159976827547659/)
With scripts from other mods, there's no override option, nor can I delete or edit them. What is the workaround here?
My specific scenario, I'd like to reduce the amount of people required nearby for radio backpacks to be deployed. I found the script affecting it but can't figure out a way to edit/override it.
https://community.bistudio.com/wiki/Arma_Reforger:Weapon_Animation/Basic_Tutorial
This Modding Boot Camp seminar was originally held on the Arma Discord Server on April 2nd, 2025.
In this session, Modding Supervisor Mario Enríquez goes over the advanced features of animation scripting.
TIMESTAMPS ARE WIP
00:00 Intro
00:17 Start of pre...
You can override scripts from other mods, you just override the same class/method they override and yours should take precedence
I assume there is no way to walk through all prefabs in the same way you could walk through the entire config in RV games?
From our testing, it does appear that unfortunately the pylon weapon system was mainly designed for rockets. You will encounter more problems if you try to combine different weapon types on the pylon. This also includes challenges like handling various weapon’s fire modes.
That is... disappointing to hear... Guess I swap to armaments it is..
Could still maybe make it work for another project but not for what i'm aiming for with current
We didnt expect to have to keep armaments going, our intention was to replace it with these new vanilla systems too
I was kind of expecting to see a good chunk of armaments die outside of the heat seeking system and radar, you get to live for another day 
More work for me yippee 
Also while you're around, i'm not crazy... right... they added flare pod prefabs so I can only assume they intend to add some sort of SAM system in the distant future 
https://x.com/maruksp/status/1882347244059557903
maybe arma 4 
In Scripts/WorkbenchGame
Then in the Enfusion Workbench you can hit plugins, then "Goose's Prefab Dump"
4th times a charm
Thanks! I wonder if it possible to do this off workbench?
off workbench? unsure, i followed the advice of Bacon on this one making a plugin
How do I convert the translation key to the actual name via code? Like #AR-...
WidgetManager.Translate
Or SCR_StringHelper.Translate()
Is there a way to query all prefab names (and their resourcenames) under a certain directory (e.g., \Prefabs\Rocks*.et)?
In a WB Script SCR_WorldEditorToolHelper.SearchWorkbenchResources
I want to do this on dedi server.
Not sure if there is one that works runtime.
does anybody know?
is there a way to know if the player is inside a FOB ?
thx so much
also I forgot to mention earlier, but its prob worth making a feedback bug ticket about this because in reality both guns should be replicated
Does anyone know how to do this potentially? Or if it’s possible?
A custom QueryEntitiesCallback
anybody can help i try to bind garage to save in Enfusion persistent framework
SCRIPT (E): Can't compile "Game" script module!
Scripts/Game/Garage/Life Garages.c(12): S
That error literally explains the issue
Line 2 - Missing Class for component
Line 9 - Missing Class for component
Line 12 - Can't ref GarageVehicleData
Line 14 - Can't overload PlayerGarageStorage
Line 16 - Can't ref GarageVehicleData
Line 61 - EPF_PersistenceManager.TryLoad is an undefined function
Line 65 - You're trying to create an instance of a GenericComponent (that's not how that works)
Line 77 - EPF_PersistenceManager.Save is an undefined function
Line 86 - You're trying to create an instance of a GenericComponent (again that's not how that works)
Line 207 - Trying to RplProp a component(You can't do that) in a useraction(Can't do that either)
Line 237 - Trying to RplProp a component(You can't do that) in a useraction(Can't do that either)
Kinda weird that the error complained about line 12 first.
From the tooltip one would assume it obstructs them all.
hmmm, guess not what I need then
Actually after lookiing around a bit, it seem that only the optics use "Attachment Obstructs" and it just obstructs the iron sights
FileIO.FindFiles
That doesnt work on a dedi server
I tried deploying files from my own mod to profile folder and I wasnt able to read them lol
Hello, tell me how to use "SCR_ScenarioLoadingScreenWidgets.c".
I want to change the loading image. "I created the "Scenario Loading Screen.layout" and tried to change it, but nothing worked.
Look at GUI video
Also @ocean kernel this was my result
you inherit from the wrong classes, please check the readme/docs folder of my mod again carefully.
I hadn't tried but, clearly a workbench function won't work lol
FileIO is not workbench-exclusive
I know.... Guy is wanting to do things on a dedi. A workbench function clearly wouldn't work on a dedi.
SCR_WorldEditorToolHelper.SearchWorkbenchResources and ResourceDatabase.SearchResources clearly won't work.
I suggested FileIO
Yes, FileIO won't work on dedi to read contents from addons
And I also said that I hadn't tried.
Thanks guys for the replies. Seems to be a tough nut to crack. My end goal is to find a way to list e.g., all rifles available on dedi including vanilla rifles and those defined via mods.
ResourceDatabase was updated semi recently to work outside of workbench and could be used at runtime on dedicated servers. I believe this is already in 1.3
You don't understand, I think I did everything right, but it doesn't work, so I decided to contact here. Why are you advising me to watch videos? What the hell is this chat for if they send you to watch videos here?
This works really nicely. Thanks.
This channel is to help with scripting. If it doesn't work then you clearly didn't do everything right, so watch the video again and find out what YOU did wrong.
Why does this shuffle example not work? 
Cannot convert 'array<@MyClass>' to 'array<MyClass>' for argument '0' to method 'Shuffle'
array<ref MyClass> values = { new MyClass(), new MyClass(), new MyClass(), new MyClass(), new MyClass() };
SCR_ArrayHelperT<MyClass>.Shuffle(values);
Works when I remove the ref from the array but I need that
try new ref MyClass()
I heard new ref is bad
Well you kinda have to pass them as a ref if your array expects them as a ref
I don't think you can do new ref anymore actually.
Cant even new ref anyway. And the problem is with the array itself, this doenst work
array<ref MyClass> values = {};
I guess the ArrayHelper wants it without ref but why make an example that doesnt work 
array<ref MyClass> values = new array<ref MyClass>();
Thats the same as {}
Well that works 199% of the time for me
50% of the time it works all the time
Works all the time when I copy all the logic and use it myself
SCR_ArrayHelperRefT
Lol
It is. You're passing in an array of ref'd classes and the function expects an array of "non ref'd" items.
Oh I misread that
@late locust new Ref Class is ALWAYS WRONG
possible to make something a public get but private/protected set like in c#?
Anything on this from anyone, ideas on how I can make this work in MP/Dedi server? Attaching it to a different entity maybe?
you'll need to use replication in order to sync, say a variable, to your target clients. have you watched the bootcamps on replication yet?
I'm well aware.
Thanks for telling us for the millionth time. Lol
Did I ever tell you, that new REF is ALWAYS wrong? 
I just put it there everytime it is mentioned because of the newbies that might just take it
can we get the !quote bot on this?
Lol. I only suggested he try because of the error he was getting.
always put ref unless it dont compile, gotcha thank you.
Hi, I'm having a small issue with a modded gadget when it is in hand we set the context active to capture input but the context is being set active for all clients in presence of the gadget, how can I make sure that the InputManager Context is only set to active only for the person that is holding the gadget?
Hey folks, totally new to Enfusion scripting and was just curious: I've managed to create a mod that extends SCR_BaseGameModeComponent so it can listen to player-related events. I've manually added the component to the game mode's SRC_GameMode in my workbench space and verified that my callbacks are hit, all is great.
But there's a logical gap missing here for me, and maybe I skipped over something in the Bootcamp videos that covered this. If I want this component to be available in any game mode in any world -- what's the approach for that?
if there's guide I missed something explaining these concepts or this approach, would love to read more too.
If you want some methods that need to be available at all times on wherever your mod is loaded you're probably needing to use a System
GadgetManager has GetHeldGadget
Or something like that not on computer
So a question about this. I was looking through classes that derive GameSystem and I'm not sure I agree that it fits this use case? Just to set the scene, I'm only trying to hook events like player connect, disconnect, etc. and then do some actions.
It almost seems like doing a modded SCR_BaseGameMode would be the necessary approach? Do you disagree?
I don't think I'm experienced enough, but if you're modding the SCR BaseGameMode then any GameMode that extends from that will have your logic, since modding a class is sort of the way to overwrite/extend with your own functionality. So if a server has your mod with a modded SCR BaseGameMode and they have a Conflict Game Mode then your logic will be present unless overwritten by other mod that modifies the same class
Right, that's exactly what I want. To your last point though, would two mods which have the same modded class and invoke the super.OverridenFunc() conflict with each other? or are both implementations called?
I'm not a 100% sure but it would make sense if both modded classes override the same function but are calling their super that both classes logic would be applied
think of it as a fork in the road
I'll be real this is not a helpful analogy. Are you saying that there can only be one mod overriding the class? This would make sense in the context of other OOP languages but I wasn't sure how this works in their VM
Super.override() will ensure that the previous overrides still execute, mod load order matters in this case I believe
Oh cool, so they chain like this (assuming load order is 1, 2, 3):
[3rd mod super.fn()] -> [2nd mod super.fn()] -> [1st mod super.fn()] -> [orig.fn()]
I was hoping that was the case.
Finally managed to find docs: https://community.bistudio.com/wiki/DayZ:Enforce_Script_Syntax#Modded_class
ty for the input
I believe so and if you wish to bypass what other mods do, use the vanilla.override() keyword instead of super.override()
how do i register a system that is derived from a common class? what's the work around since its not supported yet
That's the docs for DayZ standalone. Some functionality may be shared but that's definitely not what you should be using for Reforger documentation.
What?
It's the only reference I could find that detailed the modded keyword in that manner. Otherwise yes I'm looking specifically for Arma docs
sorry I meant that I am specifically seeking out the reforger content and not mixing and matching
Say I want to display some vehicle prefab in ItemPreviewWidget or RenderTargetWidget, but the vehicle is not yet loaded in the world. So far I figured you can do this through:
- Separate world, spawn with
SpawnEntityPrefab, but this won't work on clients - Separate world, generic entity and set some VObject to it, but this is not really a complete vehicle, but just its model without prefab specific changes
Any other possible ways to do it?
Seeing how vanilla game master has all assets as premade images I'm starting to guess its not really possible
or very impractical
My goal is to setup a scene rather than just using single prefab through ItemPreviewWidget + ItemPreviewManager
This is the workaround I was asking about:
class ParentSystem : GameSystem
and
class ChildSystem1 : ParentSystem
class ChildSystem2 : ParentSystem
you cannot actually register them to ChimeraSystemSettings.conf due to a limitation on current implimentation of systems.
You have to actually do:
class ParentSystem1 : GameSystem
class ParentSystem2 : GameSystem
class ChildSystem1 : ParentSystem1
class ChildSystem2 : ParentSystem2
and copy the parent system
I see it has ResolvePreviewEntityForPrefab, gonna try with it
Yeah, that's the workaround lol
is this currently documented somewhere? or are we just either figuring it out, or spreading the info between us
There is no workaround. Inherited classes don't work.
Oh, there is SpawnEntityPrefabLocal 
Welp, it works, except workbench crashes after I end the game.
Not also current but for ever, it is intended like this. We do not support inheritance for them if both are active at the same time.
Yeah I need to dial down time spent modding since it crashes so much in 1.3 I'm blocked on like 3 projects
Hello everyone, this is a question that anyone may have encountered. I have created my widget and the class that manages it. I delegated SendText to my BaseGameMode, but for some reason everything works fine with sp and the labels in it change, but when I fill in mp, the widget is updated only with Init. I'm sure the problem is hidden in Replication, but I can't figure out how to defeat it.
modded class SCR_BaseGameMode : BaseGameMode
{
protected ref TicketsHUDComponent m_HUDComponent;
protected override void OnGameModeStart()
{
super.OnGameModeStart();
if (!m_HUDComponent)
{
m_HUDComponent = new TicketsHUDComponent();
m_HUDComponent.Init();
}
}
void UpdateHUDText(string newText)
{
m_HUDComponent.SendText(newText)
}
Are you sure about that? Isn't the entire point of SetUnique(false) to allow such situations in the new implementation of systems?
It's stated that the legacy system that we currently have is always set to unique.
Ah great, we already have those changes out, forgot. Yes the wiki page explains whats the deal with it 🙂 Thx for the link kex
Is there any ETA on new systems? Is it like 1.4-1.5 or Arma4 timeframe?
Additional changes are coming in a future major update, 1.5ish maybe yeah. A clear cut updated version that removes the whole backwards compatiblity in favour of better performance and configuration is an Arma 4 thing.
Do these additional changes include WorldControllers?
You know what to do, send report, give ids, let us see whats up. Workbench crashes are at the very end of todo lists as they are abysmally infrequent compared to the main game, so do not expect them to magically disappear by us getting bored and looking at the <0.1% incident rate issues. That is somewhat sad, but its just the realitiy.
What time of day should I post them at for maximum chance of being looked into?
im heavly a noob so any link to a tut would help but im using cinematic mode to make some angles, how would i make the vehicles move, shoot so on? im sorry if its a dumb qiestion ive tried looking online
The real question is when are we going to get the ability back to change classes in slotmanager 
Haven't experienced this mine's running pretty smooth. A crash here or there.
feel free to bump my ticket https://feedback.bistudio.com/T190345
Yeah I didn't realize until the other day I had to duplicate an existing slot with the class I wanted to get it to add properly haha
That code is probably running only on server basically, what calls UpdateHUDText?
It's good that it shows up initially, which means init is running on clients. but whatever is calling UpdateHUDText is doing it from server side so client never runs it
Did
I have a ton of wacky vehicles I'm in the process of creating and that just slowed it down horribly. Worst bug to exist, probably because they changed the method to external.
You could probably change that method to add RPC like so:
void UpdateHUDText(string newText)
{
m_HUDComponent.SendText(newText); //Probably don't need this, but this will always run on server or singleplayer
Rpc(RpcDo_UpdateHUDText, newText);
}
[RplRpc(RplChannel.Reliable, RplRcver.Owner)]
protected void RpcDo_UpdateNetwork(int networkID, array<RplId> radioIDs)
{
m_HUDComponent.SendText(newText);
}
This is cheap but has a few problems, but might be a non-issue. The updated text is only sent to clients that can recieve this, so JIP won't have correct text, I'm going to assume gamemode is always "streamed" so all clients on server should get the RPC ideally. If you are constantly updating it, you could use Unreliable RplChannel to drop packets but if you only RPC when it actually changes, won't be a big issue.
Alternatively, you could add at the top of the class a rplProp with the text saved to it, you set it by the server instance, so instead of doing the above, you would do:
[RplProp(onRplName: "UpdateHUDText")]
string hudText = "";
protected ref TicketsHUDComponent m_HUDComponent;
protected RplComponent rplComp;
protected override void OnGameModeStart()
{
super.OnGameModeStart();
if (!m_HUDComponent)
{
m_HUDComponent = new TicketsHUDComponent();
m_HUDComponent.Init();
}
rplComp = RplComponent.Cast(GetOwner().FindComponent(RplComponent));
}
void ChangeHUDText(string newText)
{
if(rplComp && rplComp.Role() != RplRole.Authority) //Only server should update the property
return;
hudText = newText;
Replication.BumpMe();
}
void UpdateHUDText()
{
if(!m_HUDComponent)
return;
//OnRplName does not trigger this function on server, only clients.
m_HUDComponent.SendText(hudText); //Whenever a client streams a change to this component's hudText rplProp, we set their text.
//JIP is handled gracefully
}
To be extra safe, if it needs to trigger in single player as well you can do a check if(!System.IsConsoleApp()) to check if we aren't a console app (a server), even if Replication.IsServer() is true, in order to manually run the UpdateHUDText() function.
There are some things that just absolutely cannot run on a console app like dialog windows, even though it will let you try haha.
Strings should never be ref'd
Do not add ref on anything unless it is both managed and you had to call new to create it
Also
Use roles, not if(!Replication.IsServer()) and such.
Sorry! Thanks for the heads up.
I've been ref'd 
reference protected ref SharedItemRef MarioE;
(Yes, reference is a keyword)
Coming from JS, pointers are still a weak spot of knowledge for myself. JS let me cheat a lot in this aspect
return new ref SharedItemRef GameSystem(new ref MarioE);
I wondered why nested attachment slots are not implemented, lines become longer than INT_MAX and dont compile
Also, when I did map without ref inside a map it didnt work
Probs cleaned up immediately
Not you later after doing such things.
This crash is probably something to do with refs db2a7b1e-6f40-4cf9-b78d-f7cf496a6ae6
Where are the compositions for conflict listed?
All conflict-related contains Campaign in its name
Hello people anybody can help with Life Garage for servers mode,
https://reforger.armaplatform.com/workshop/64EF3D89BCE67875-GaragesforLifeServers
how i can make EPF persistent save
06.04 2025 15:37:26
Unhandled exception
Program: /home/container/ArmaReforgerServer
Reason: Unknown
Class: 'RHS_SlidingInventoryStorageSlot'
Function: 'Insert'
Stack trace:
scripts/Game/generated/InventorySystem/RHS_SlidingInventoryStorageSlot.c:44 Function OnAttachedEntity
scripts/Game/WCS_LoadoutEditor/GameMode/Loadout/WCS_ArsenalManagerComponent.c:703 Function LoadCharacterFromFile
scripts/Game/WCS_LoadoutEditor/GameMode/Loadout/WCS_PlayerArsenalLoadout.c:75 Function OnLoadoutSpawned
scripts/Game/GameMode/SCR_BaseGameMode.c:1262 Function OnPlayerSpawnFinalize_S
scripts/Game/GameMode/SCR_GameModeCampaign.c:1301 Function OnPlayerSpawnFinalize_S
scripts/Game/GameMode/Respawn/SCR_RespawnSystemComponent.c:357 Function OnPlayerSpawnFinalize_S
scripts/Game/Respawn/RequestHandling/Base/SCR_SpawnHandlerComponent.c:160 Function FinalizeRequest_S
scripts/Game/Respawn/RequestHandling/Base/SCR_SpawnRequestComponent.c:459 Function FinalizeRequest_S
scripts/Game/Respawn/RequestHandling/Base/SCR_SpawnRequestComponent.c:421 Function AwaitFinalization_S
scripts/Game/game.c:924 Function OnUpdate
Runtime mode
CLI params:
Got this error right before a server crash
Sanity check:
A given RplComponent's Id (RplId) will or will not match between proxy and the authority perspective?
I found it like a month ago, but I can't find it now.
Hello where can i find Guid of Items
Prefab - Defines the prefab that should spawn. This is the GUID of the prefab, not the whole path.
how do i grab the character's player name?
How would one test things like the radio UI as displayed when another player is talking or the HUD when another player is in range? I can't seem to figure out how to get the world editor to even show name tags for a random AI I plopped down 
Peer tool or look at VON_Entry scripts
Got the peer to work, thanks! Any idea why a name tag wouldn't be showing for peers on the same faction? I have no idea if this is just a scenario setting or something I missed
Also, I am trying to emulate the squad marker entity system for something I am working on and I've set up mine up pretty much the exact same in terms of having config class and marker entity class. I am trying to use:
AG0_MapMarkerEntityAG0 myMarker = AG0_MapMarkerEntityAG0 .Cast(m_MarkerMgr.InsertDynamicMarker(SCR_EMapMarkerType.AG0_MARKER, someentity.GetOwner()));
This is erroring while:
SCR_MapMarkerEntity myMarker = m_MarkerMgr.InsertDynamicMarker(SCR_EMapMarkerType.AG0_MARKER, someentity.GetOwner());
Works...
My entity extends SCR_MapMarkerEntity just like SCR_MapMarkerSquadLeader - I don't know what I am doing wrong here, is there something I am missing?
I'd just look at the script to see how it determines name visibility
You could mod it or figure out where they pull info from, I know there is stuff in server config that might have some options.
There’s a server config setting for disabling the von UI, as for name tags check your gamemode prefab for SCR_Nametagmanager and try assign a config if not set
https://community.bistudio.com/wiki/Arma_Reforger:Server_Config
VONDisableDirectSpeechUI
You need to duplicate the base prefab for the MapMarker - and change it's class type to the one created for the entity.
Change RplComonent to be like image above.
look at one of the savedata components
that already exist in el\epf\edf
is there a way to know if the player is in Game Master?
as in if they are not in there body but in camera
i dont understand how i bind this mode with epf
SCR_EditorManagerEntity editorManager = SCR_EditorManagerEntity.GetInstance();
if(editorManager && editorManager.IsOpened())```
whats this
SCRIPT (W): @"Scripts/WorkbenchGame/ScriptEditor/SCR_NewScriptPlugin.c,112": 'GetAddonIndex' is obsolete: Use GetAddonID instead
why is vanilla using obsolete stuff
it happens, the warnings are pretty recent iirc so some updating is needed but it will still function
SetGUIWidget for example is obselete and replaced by SetRenderTarget/RemoveRenderTarget
Since the index on SetGUIWidget wasn't functional anyways
Thank you
isnt this one kindof important?
SCRIPT (W): @"Scripts/WorkbenchGame/ScriptEditor/SCR_NewScriptPlugin.c,112": 'GetAddonIndex' is obsolete: Use GetAddonID instead
i have a instance here where one of my players gets errors when certain mods are installed (and not being used on current server) and the errors go away when he deletes them
I imagine that it still functions, it's a warning that it is replaced and prone to break on a future release, I guess testing would be required
if he knows what mods they are it might help narrow down an issue but ultimately if they aren't loaded it doesn't matter if they are installed of not
when you join a server for example after compiling scripts it runs a check against the server based on what is loaded, if that check fails you won't be able to connect
this isnt a broad case, he also has minimal specs to play reforger but it still shouldnt be happening
and that is more of a game issue of loading mods than something wrong with any scripts
has mods installed > joins server that DOES NOT use the mods > replication flooded.
when he removes epf edf and el, and any mod that depends on them. and then joins the server. no flooded
Well if you have a repro, with addon ids and environments I can certainly help test the hypothesis
and maybe help narrow down the issue but bohemia said they are aware of it and I imagine they are farther along in investigating it.
its a single case of this happening, ive been trying to diagnose what was causing our rpl floods the past 2 days
have you seen arkensors post?
is it recent/
this one
yeah i saw, me and him have been chatting about this issue for the last day in DM
at first i thought it was my map so i had done everything i can to debug things within my mods
when all i had to do was remove his stuff and everything works perfect
no floods without his mods
but that case where someone had his mods but server didnt require them was still getting the error until he deleted them
thats the part that makes zero sense to me
even if hes got a old machine, that shouldnt be possible.
You are correct that it shouldn't be. Some times people are cursed haha. I really need to start adding to my wiki
https://reforger.armaplatform.com/workshop/64EF3D89BCE67875-GaragesforLifeServers
anybody get work it with epf?
bro you need to make a savedata component for the component that stores the cars
when i store the cars they come with start loot back
so u can dupe all starting vehicle loot
use EL_QuantityComponentSaveData as an example and make your own
ok i take a look
does that compile?
no luck thx should wait for fixed one
Action activated procedural animations seem to have been bugged out on servers since the 1.3 update. Has anyone else run into this issue?
Oh, thank you very much. I solved this problem by reading the instructions on the wiki, specifying RplRcver. Broadcast, but now I saw your answer and the second option with changes in BaseGameMode looks great. Thanks, I will redo and test) Thanks again. I have another question, but it does not require a deep answer, this text should be displayed for different teams with different text, can you advise something?
ahaha thanks for the detailed answer, now I understand MP scripting better
When the update function runs locally have it check faction affiliation, if faction is this, set text to this text.
You can have two rpl props point to same update function if you want
yes that sounds good thanks for the help
So, i have this RplProp, which doesn't work:
ref array<EntityID> m_aObjectChildrenIDs = {};```
In the
```RplName_UpdateChildren```
i have
```Print("CHILDREN: " + m_aObjectChildrenIDs);
Print("CHILDREN COUNT: " + m_aObjectChildrenIDs.Count());```
which on BumpMe prints correct array's count, but values are always 0x0000000000000000
Values on the server are fine
Also Entities involved are loadtime and do NOT have their rpl state overriden to "runtime"
EntityID shall not be replicated, they are local to each machine. What you probably meant to replicate is RplId
I thought that was the case for IEntity, and EntityID were supposed to be specifically for that case
But thanks anyway
Entity id is is a locally autoincremented value, which is there for any entity, even those that are not replicated. Mainly used by our internal code. No two machines are likely to have the same entity ids for a newly spawned entity after the game run a while
yes, but what if they are loadtime? are they still different?
because i'm only interested in loadtime for my case
Loaded entities from the world layers should have deterministic ordering and thus matching IDs, even if they are not replicated. But this is not something you can rely on or expect backwards compatiblity if we ever need to change this. So use with caution.
As to your problem, we likely have no rpl codec for entity id, as we do not intend for it to be replicated. You can not implement a scripted one either as it is an int64 under the hood which script can not handle (maximum is int32).
only EntityID and WorldTimeStamp (When it comes to the handle64 ones) have the rpl codec stuff
Something happened in the way
Ok, i see, i thought i was going crazy, i was 100% sure that you can rely on EntityID for the loadtime entities because i got it from the replication stream (even checked now just in case - 1:00:46)
Maybe i misunderstood
In loadtime, you can rely
Yes, but this is the case, i'm doing stuff with loadtime entities and it gives me grief. But you say it should have codec?
Until he can't because
needed to change something. That is why I can not recommend it
This one is not changing
It would break everything else
But that is not his issue
Something else happened, and want to know what broke
So is it my side or enfusion? If using rplids is better/safer i can switch to that i guess
Share whole code pls.
It's huge and ugly, but i'll try
There might be an issue with array initialization, try doing = new array<EntityID>; just for fun. I doubt it's the issue
When replicated, whole array gets trashed/destroyed. And every element in it gets constructed from scratch. Even if a single element changes. So it is not that.
Figured, I had an issue myself with them a while ago but not for this reason
How do I get backend to work in WB play mode? It sometimes works sometimes doesnt
I want it to either work or not work, but consistently
I actually seen that while searching this channel and already tried with no luck
ref array<EntityID> m_aObjectChildrenIDs = {};
...
if (GetOwner().GetParent())
{
BaseRplComponent parentRPLComponent = BaseRplComponent.Cast(GetOwner().GetParent().FindComponent(BaseRplComponent));
if (parentRPLComponent)
{
UAB_MTO_Component parentMTOComponent = UAB_MTO_Component.Cast(GetOwner().GetParent().FindComponent(UAB_MTO_Component));
if (parentMTOComponent)
{
EntityID childID = GetOwner().GetID();
parentMTOComponent.RemoveChildID(childID);
}
GetOwner().GetParent().RemoveChild(GetOwner(), true);
}
}
...
...
if (newParentID)
{
IEntity newParent = GetGame().GetWorld().FindEntityByID(newParentID);
BaseRplComponent newParentRPLComponent = BaseRplComponent.Cast(newParent.FindComponent(BaseRplComponent));
if (newParentRPLComponent)
{
UAB_MTO_Component newParentMTOComponent = UAB_MTO_Component.Cast(newParent.FindComponent(UAB_MTO_Component));
if (newParentMTOComponent)
{
SCR_Global.SetEntityAsChildToParent(newParent, GetOwner());
EntityID childID = GetOwner().GetID();
newParentMTOComponent.AddNewChildID(childID);
}
}
}
...
void RemoveChildID(EntityID childId)
{
if (m_aObjectChildrenIDs.Contains(childId))
m_aObjectChildrenIDs.RemoveItem(childId);
Replication.BumpMe();
}
void AddNewChildID(EntityID newChildId)
{
if (!m_aObjectChildrenIDs.Contains(newChildId))
m_aObjectChildrenIDs.Insert(newChildId);
Replication.BumpMe();
}```
This all is within one component, code is running on authority
RplName_UpdateChildren (i got rid of what was going on there, just left the prints) :
{
Print("CHILDREN: " + m_aObjectChildrenIDs);
Print("CHILDREN COUNT: " + m_aObjectChildrenIDs.Count());
}```
Also I am going to insert refs everywhere out of spite for not being able to pass functions as parameters
Malicious mod 
Also, Replace All in script editor with my Addon selected does not actually replace all
I dont know what it does, but it doesnt replace all
Nevermind I had to use it 3 times
Mathematically speaking, what kind of operation does Math3D::MatrixInvMultiply3 do?
Multiply a 3x3 matrix with the inverse of another 3x3 one
So A * B^-1?
The codecs for both EntityID and Worldtimestamp are broken
Technically speaking yes, as of end result at least.
It does some checks first to know if the matrix to be inversed is orthonormal
If so, then it will do A * Transpose(B)
Which is WAY faster
Taking advantage of this
vector A[3] = { "1.5 2.5 0", "0.1 1.3 0", "0 0 1" };
vector B[3] = { "1 0.4 0", "0 1 0", "0 1.3 2.7" };
vector Bi[3];
Math3D.MatrixGetInverse3(B, Bi);
vector result[3];
Math3D.MatrixInvMultiply3(A, B, result);
PrintFormat("result: %1", result);
vector result_ABi[3];
Math3D.MatrixMultiply3(A, Bi, result_ABi);
PrintFormat("result_ABi: %1", result_ABi);
Prints
SCRIPT : result: 0x000001CC2B3755D4 {<2.500000,0.620000,0.000000>,<2.500000,1.300000,0.000000>,<3.250000,1.690000,2.700000>}
SCRIPT : result_ABi: 0x000001CC2B3755F8 {<1.460000,1.980000,0.000000>,<0.100000,1.300000,0.000000>,<-0.048148,-0.625926,0.370370>}
The heck is going on?
Thanks for checking
let me check
How big can be the string sent as output of server command
Relevant ticket: https://feedback.bistudio.com/T186903
Actually, the codec only seems to be broken for array<EntityID> , but not EntityID.
We currently use a wrapper as workaround for arrays of EntityID: https://github.com/acemod/ACE-Anvil/blob/913a575a64d3a9eb616c6772d00a7ce9789723c9/addons/core/scripts/Game/ACE_Core/GameMode/Components/ACE_LoadtimeEntityManager.c#L97
You answered me here already but thanks again 
Just make sure you dont use string.Format for long strings since it's capped to 1023
Better to do string + string since it appears to actually work
Or whatever it was
Anyone know how to "activate" a mortar shell. I want to spawn a mortar above a player have it explode once it collides. Ideally would have all the sounds of an active mortar as well
About string.Format? I think in 1.3 it's still capped to 1023
Code says "(Maximum output string size is limited to 8191 characters)"
But I dont trust code comments anymore
Also why 1023 and not 1024
Launch should also activate it ProjectileMoveComponent::Launch
To just activate the trigger:
BaseTriggerComponent trigger = BaseTriggerComponent.Cast(projectile.FindComponent(BaseTriggerComponent));
trigger.SetLive();
So, i am switched to RplIds and
ref array<RplId> m_aObjectChildrenRPLIDs = new array<RplId>();```
is working fine and syncing on the client on BumpMe, BUT, when i do
```IEntity newChild = IEntity.Cast(Replication.FindItem(newChildRPLID));```
to get the entity from rplid it returns NULL on the client.
Do these objects even have a RplComponent?
of course
IEntity newChild = IEntity.Cast(Replication.FindItem(newChildRPLID));
Where do you execute this code? Could be that you do it too early where theRplComponentisn't done with the init yet
Gotta make sure the client has its values updated ^
What is the difference in server environments from dedicated servers, workbench and the local scernarios in game
Right now i am using this. But the speed of the shell seems way to fast? I'm not sure i understand initSpeedCoef. At 1 it should be whatever the InitSpeed variable is so 66? 66m/s??
moveComponent.Launch(vector.Up * -1, vector.Zero, 1, spawnedEntity, null, null, null, null);
well after init
It seems my methods work in workshop and dedicated but does not in the scernario browser in game
Apparently not. Again, where are you doing it?
do rplIds always exist on a client or they are streamed in?
#ifdef WORKBENCH
(code here)
#else
if (RplSession.Mode() == RplMode.Dedicated)
{
(code here)
}
#endif
for example, this works in workbench and dedicated servers but not in local scernarios in game
in a component
When?
The client will return null for streamed out entities...
at arbitrary moment, not 0.001 after game start
Not sure, I have the same code but with init speed 0.1 :p
ok, so sounds like the entity is not streamed in
Or again you do it too early
definitely not too early
You still refuse to tell us though 😅
that's why i'd rather use EntityID
You say that and then refuse to tell us
You beat me to it lol
Exactly ^
Show code
Oh, ok
Since im new to this,
How would one get currently running MissionHeader in remote console?
Could do that they aren't streamed it
in the onRplName
Share the project 😅
in the component
Let's say this thing is on a game mode component, you may run into the issue that the entities you store there are not yet ready on the client.
Apl-nd 
Ok, i have the loadtime entities with rplcomponent and my component where stuff happens. When [RplProp(onRplName: "RplName_UpdateChildren")] ref array<RplId> m_aObjectChildrenRPLIDs = new array<RplId>(); is being bumped i get the rplid from it on the client and try to find an entity to do the parent-child assignment
I guess wouldn't have the issue if EntityID codec wasn't broken as these things do not get streamed in/out in a way regular entities do
No, you would still run into the same issue, as entities that are streamed out are literally not persent on that client. Doesn't matter if you have their EntityID.
you are talking runtime entities
I am talking about replicated entities.
i'm dealing only with loadtime
but they are still replicated
having loadtime EntityIDs are always the same on the server and client i can at least always find an entity on a client
You cannot if said entity is streamed out
EnableStreaming(false); and it will not
I never got EntityID to work, I just use rplComp.Id()
We do use EntityID without issues, but for unreplicated loadtime entities.
As I said, we use a wrapper to replicate an array of EntityID
Actually, it looks like that you are right that replicated loadtime entities don't get streamed out. I guess it's then a matter of that the RplComponent is not yet ready at that point.
I guess i'll have to come back to it tomorrow. Still i'd rather do EntityIDs way, but i guess i'll have to wait until they fix the codec.
Or you still use RPL IDs, but make the entities register to your system when they are ready.
IIRC from the replication bootcamp it's more like once they've streamed in they dont' stream out or something like that, but that is about their state as the entities still exist on the client from the beginning
Will have to dig into it because i have mostly dealt with EntityIDs
It does sound anyway somewhat like what you are doing is probably best realized with a system 😅
I absolutely agree but i started the wrong way, and already pretty far, so i'll make it work first
The BI tutorial says I need to make an enum to make my custom faction playable. I'm trying to follow the tutorial but I don't know where to make the folder structure. Is this 'Scripts\Game\Editor\Enums\Modded' supposed to be 'MYMOD\Scripts\Game\Editor\Enums\Modded'?
All script files have to be inside Scripts. Anything outside won't get compiled. Best approach is Scripts\Game\MYMOD\Editor\Enums\, as whenever two projects have the same file with the same path, one hard-overrides the other, which you don't want most of the cases.
Okay, so where do I make it? In the regular Arma Reforger folder? Like what goes in front of the \Scripts.... ?
Inside your project's folder. The other folders are read-only anyway.
Ah okay, so thats what I meant. The scripts folder would be in the same folder as 'assets' and 'prefabs' and stuff in my mod folder?
yes
Hello everyone, I hope you're all doing well. I'm embarking on my first ever scripting mod for a bit of fun. Quick question, should functions have the prefix fn or fnc?
https://community.bistudio.com/wiki/Arma_Reforger:Scripting:_Best_Practices
Combine this with your favorite C# style guide probably. I haven't seen any function prefixes like that.
Is SCR_BinSaveContext a standard binary serialization format like BSON / CBOR or is it proprietary?
asking because I'd like to use it as a data exchange format for a service out-of-engine and would rather avoid the overhead of JSON if possible
and as a follow up question, I don't want to block an event callback by serializing data. Is there a way to execute some code async or low priority thread?
That's a lot of data
What do you mean?
for a game / engine that already has frequent performance issues under high load I'd rather design from the beginning in a manner that's more performant than trying to refactor later
Idk what amount of data you'll be serializing for it to be a problem, I am considered to be the biggest json abuser in arma reforger and I have never had a problem yet
Bacon.json
buffer overflow
I used to work on low level systems (hypervisors/kernels) so unnecessary micro optimizations are usually on my mind
lucky
has there been any issues with map?
i try to assign an enum and customclass to hold data but it wont insert at all.
Does my enum need to have a value assigned to for it to key properly?
Sorry for asking so many questions, learning a lot so hopefully it's not a bother. If I want to override an action menu on an entity prefab, what's the recommended way of going about it?
I can successfully override the entity prefab and add the action menu, but this feels a bit overkill? Is there a way to do this purely from scripting that would be better?
I suppose my concern is that if other mods override there would be a collision, and I may want to extend anything that overrides that prefab.
Trying to have notification that stack when there is multiple of them. but im struggling.
biggest json abuser? I might have you beat, db with 10k players among other things stored all in json 8^) Anything else is bson so small json
Can you show a small example where you think the insertion fails?
None of you have been in the dayz modding scene it seems
I give it another year until we reach that level
Not PC modding, ran a server for a little bit and "modded" the heck out of it, was pretty fun but actual coding is a lot better imo
No, you can only add user actions via the actions manager component, so overriding the prefab is the way to go. Your worries about collisions are unfounded, as every action gets a unique GUID and another mod can only modify it with this GUID.
Solid, thanks for the reassurance. Half of what I've done so far has had me wondering if the way I'm going about something will unintentionally break other mods lol
on top of using json for loadouts in the best mod arma reforger has ever seen, I'm using json for all network traffic/packets in the second best mod arma reforger has ever seen that I'm working on a few hours per week (though that one is currently blocked by UI being bugged to heck)
I asked this question before too, but I want to add some functionality that extends the game mode. Is there a way to add a component to the game mode at runtime? or how would I otherwise go about ensuring that my component is always add to a game mode regardless of the mode? #enfusion_scripting message
I'm starting to think that modded SRC_BaseGameMode is not the correct approach -- especially if I want replication.
You cannot add components at runtime. You could just override the root parent prefab that all game modes inherit from.
Anyway, you should have a look at systems instead. Systems are the proper place for adding game logic rather than components, which are technically just meant for holding data.
Ahhhh root parent is what I was missing. I was trying to override a child and didn't see the option to do so
Is this the best example of System usage? https://community.bistudio.com/wiki/Arma_Reforger:Systems
and thank you for the input Kex, very helpful info
Also this one, but we are still using legacy systems, so stuff like world controllers are not yet working
https://community.bistudio.com/wikidata/external-data/arma-reforger/EnfusionScriptAPIPublic/Page_WorldSystems.html
Ok last question for the night: I'm messing around in the CTI_Campaign_Eden and for some reason just simply overriding GameMode_Base breaks a bunch of crap. Like even just selecting a faction breaks how the game mode auto-adds a squad and I see a bunch of VM exceptions.
Skill issue or am I missing something?
You should show us what you did. Just making an override without any changes shouldn't break anything.
confirmed skill issue while trying to repro
sorry for the noise, no idea what the deal was.
You probably forgot to use super. in the override so the vanilla code gets executed as well.
Nah I think it was maybe something weird with the Workbench state? I genuinely just overrode the GameMode_Base (no scripting changes) and things broke. Removed the overridden prefab and it worked fine
went through the steps again and it was all good
Alright.
How do I get limbs position such as left arm, right foot, etc. in the game world?
IEntity::GetBoneMatrix should do the trick
{
if (m_ActiveStacks.Contains(notifID))
{
StackedNotification stack = m_ActiveStacks.Get(notifID);
if (stack != null)
{
stack.count += 1;
stack.uiComp.SetText(string.Format("%1X %2", stack.count, stack.value));
ResetStackedTimer(stack.widget, notifID);
return;
}
}
Widget widget = GetGame().GetWorkspace().CreateWidgets(NOTIFICATION_POPUP, m_wNotificationHolder);
CustomNotificationUIComponent uiComp = CustomNotificationUIComponent.Cast(widget.FindHandler(CustomNotificationUIComponent));
StackedNotification stacked = new StackedNotification(widget, uiComp, notifID, value);
uiComp.SetText(value);
// print check before and after here appears to show that map is still empty.
m_ActiveStacks.Insert(notifID, stacked);
Show(true);
StartStackedFadeOut(widget, notifID);
}```
My enums dont have actual values assigned to them, so im curious if I need to have values assigned to the enums.
What's a good way to get whether a hitzone has started regenerating. The way I've been trying doesn't seem to work
So when you swap the rocket pod with a gun, why does it not attribute kills correctly when using the vanilla weapons system? Did you guys not plan on us using your weapons system to put guns on it ? lol
that seems like a bit of an oversight on your part
How do i get IEntity from RplID?
Is it
IEntity entity = IEntity.Cast(Replication.FindItem(rplID)); ?
Because i get NULL even on the authority. From remote console I run
BaseRplComponent rplComponent = BaseRplComponent.Cast(googa.FindComponent(BaseRplComponent));
RplId rplID = rplComponent.Id();
Print("RPLID: " + rplID);
IEntity entity = IEntity.Cast(Replication.FindItem(rplID));
Print("Entity: " + entity);```
and it gives me
```SCRIPT : RPLID: 1073742613
SCRIPT : Entity: NULL```
The entity is loadtime, it obviously has rplComponent and NO "runtime" override
class TRP1_Class: SCR_BaseTriggerEntity
{
// user script
SCR_PlayerController pc;
override void EOnInit(IEntity owner)
{
pc = SCR_PlayerController.Cast(GetGame().GetPlayerController());
vector origin = owner.GetOrigin();
pc.m_aKnownPoints.Insert(Vector(origin[0], 0, origin[2]));
int grid1 = Math.Round(origin[0]);
int grid2 = Math.Round(origin[2]);
grid1 /= 10;
grid2 /= 10;
string grid1s;
string grid2s;
if (grid1 < 1000)
grid1s = "0" + grid1.ToString();
else
grid1s = grid1.ToString();
if (grid2 < 1000)
grid2s = "0" + grid2.ToString();
else
grid2s = grid2.ToString();
pc.m_aKnownPointsStrings.Insert(grid1s + "-" + grid2s);
Print("Adding grid" + pc.m_aKnownPointsStrings);
}
};
Any reason why this isnt firing?
The print statement doesn't even Print
eventmask set?
No ended up needing to create a seperate member and call it later as the PlayerController was not yet initialized
any clue on how AnimateWidget.Value works?
The RplID is referring to the RplComponent here. Casting it to IEntity, will logically result in null.
All enum variables have a value. If you don't assign any, it will be 0.
so all the enums will have a value of 0 unless I assign them?
or will they be auto assigned 0+
Yes, if you just define ESomeType myVar;, myVar will be 0
but in the instance of map. the enum should be 0 for the first, and 1 for the second enum without me assigning any values? i just realized that the enums were printing out with values. so im still lost why the map wasnt inserting them ngl.
Can you please provide a full example that can be run. How should I know what you pass to ShowStackableNotifications...
I deleted the script for now but I can write it again in a bit.
I just pass an enum, then i create a custom class that holds widget/ui components and values. I then insert the enum as the key and the new custom class as a value.
Just make a simple self-contained example that showcases your issue
Fair enough, sounds like this should solve my problem. Thanks
Im using a few custom components. so im unsure how to have my code.
{
protected ref map<eNotificationList, StackedNotification> m_ActiveStacks = new map<eNotificationList, StackedNotification>();
void ShowStackableNotifications(eNotificationList notifID, int value)
{
if (m_ActiveStacks.Contains(notifID))
{
StackedNotification stack = m_ActiveStacks.Get(notifID);
if (stack != null)
{
stack.count += 1;
stack.uiComp.SetText(string.Format("%1X %2", stack.count, stack.value));
return;
}
}
Widget widget = GetGame().GetWorkspace().CreateWidgets(NOTIFICATION_POPUP, m_wNotificationHolder);
CustomNotificationUIComponent uiComp = CustomNotificationUIComponent.Cast(widget.FindHandler(CustomNotificationUIComponent));
StackedNotification stacked = new StackedNotification(widget, uiComp, notifID, value);
uiComp.SetText(value);
// print check before and after here appears to show that map is still empty.
m_ActiveStacks.Insert(notifID, stacked);
}
void ShowNotification(eNotificationList notifID, int value)
{
if (notifID == eNotificationList.TestValue1)
{
ShowStackableNotifications(notifID, value);
return;
}
// Regular ui component code for other enums.
}
void SendTestValue()
{
ShowNotification(eNotificationList.TestValue1, 50)
}
};
class StackedNotification
{
Widget widget;
CustomNotificationUIComponent uiComp;
eNotificationList enumValue;
int count;
int value;
void StackedNotification(Widget widget, CustomNotificationUIComponent uiComp, eNotificationList enumValue, int value)
{
this.widget = widget;
this.uiComp = uiComp;
this.enumValue = enumValue;
this.count = 1;
this.value = value;
}
};
enum eNotificationList
{
TestValue1,
TestValue2,
TestValue3,
};```
{
override event protected void EOnInit(IEntity owner)
{
super.EOnInit(owner);
if(IsMaster())
{
// Setup animatedBloodManager
BS_AnimatedBloodManager animatedBloodManager = BS_AnimatedBloodManager.GetInstance();
if (!animatedBloodManager)
{
animatedBloodManager = BS_AnimatedBloodManager.Cast(GetGame().SpawnEntity(BS_AnimatedBloodManager, GetGame().GetWorld(), null));
// Use SetInstance() instead of direct access
if (animatedBloodManager)
BS_AnimatedBloodManager.SetInstance(animatedBloodManager);
}
// Ensure animatedBloodManager is valid before scheduling functions
if (animatedBloodManager)
{
// it works fine. If it breaks, we're fucked.
GetGame().GetCallqueue().CallLater(animatedBloodManager.failSafe, 30000, true); // Runs every 30 seconds 30000 ms
}
}
}
};```** I'm about to lose my mind, this code works fine on local devices but when run on a server the function I call with GetGame().GetCallqueue().CallLater() does not create a loop. what is the best way to call a function loop when the game starts? what am I doing wrong?**
In 1.2 it worked without any problem. I'm not sure if something is breaking the loop or not starting it at all.
Where does the damage to the armor of burning vehicles come from? I try to hijack it but it continue to receive damage except that no any other parts is damaging
You probably should transition into using a system (frame) instead of using the call queue
Hi,
each time I try to add a script in the Object Properties I get a Can't compile "Entities" module. Even though I let the workbench create the script file itself and just add a super to what it made. I understand that I'm missing something quite obvious, but being new to scripting I don't get it at all.
For example here's what inside the On Player Killed:
`class GameMode_Campaign1_Class: SCR_GameModeCampaign
{
override void OnPlayerKilled(int playerId, IEntity playerEntity, IEntity killerEntity, Instigator killer)
{
super.OnPlayerKilled();
}
};`
Possibly better to make your own GameModeComponent script that inherits SCR_GameModeComponent and attach it to your gamemode. It seems to have most if not all the same functions that GameMode has
First mistake is the definition of the map. It should of type map<eNotificationList, ref StackedNotification>, otherwise StackedNotification will get hit by the GC and become null.
Hi,
I have a menu script that works fine in the editor and offline, but it doesn't open at all on the server. Can you help me identify the issue?
Is there a way to get the concrete type name a variable that was downcasted to an interface? i.e. I have an IEntity and want to see what it's a concrete instance of
Ahhhh hard reference the new stackednotification. Is that why it could be not inserting or not holding reference. Would GC be removing it within seconds?
I've create a override void for EOnFrame within a class that inherits from ScriptComponent, however the contents of the method do not run. Does anyone have any suggestions?
override void EOnFrame(IEntity owner, float timeSlice)
{
Print("test");
};
EDIT: For anyone stuck with this, Sa-Matra's suggestion of "SetEventMask(owner, EntityEvent.FRAME); on init" was the solution
I have a override for PostInit in the same class and it works fine
Probably missing SetEventMask(owner, EntityEvent.FRAME); on init?
So I'm creating two UAZs with SpawnEntityPrefabLocal inside a newly created world to display the world in RenderTargetWidget and since unknown point in time it started bugging out with this error. I thought it had to do with resources being released or something but apparently its supply system used in Conflict? Apparently this setup worked before 1.3 but I'm not sure. Any ideas how to solve this?
Apparently it errors out right after SpawnEntityPrefabLocal, I don't even get a chance to try to disable the SCR_ResourceComponent component
Apparently apparently apparently
Have a constructor method?
use a system instead of EOnFrame if applicable. what are you trying to do in total?
It is indeed the supply system for conflict, if it worked before but not now it's probably just the patch, this patch has a lot of issues specially around the resource system
Most of the time though with errors like that don't worry too much as they'll fix them selves or not effect the client in a super negative way, it is however annoying for you in workbench. When it starts to crash you in workbench that's when you should be really concerned.
Thanks. I guess I have no choice but to just leave it for now.
The question is when exactly did it stop working, was it a few days or since the patch, if it was still within the same patch then there might be something you're doing but I can't imagine what. That's an odd-ball error that pops up from time to time.
I had it working before 1.3 but I don't remember if I ran it after until now.
Then it probably could just be the patch unless you're modifying the vehicle's prefab but doesn't sound like it. Could also try a different vehicle and see if it happens*
Works with another vehicle so far 
Then the vehicle prefab is bugged, it happens. Like I said don't fret to much about it, that particular error will happen from time to time but from my experience it's nothing serious, I've had it happen a few just by opening assets in the world editor. So long as your workbench isn't crashing it's w/e and shouldn't popup on a production client.
Welcome to Reforger, you got interested at the worst time 
"{259EE7B78C51B624}Prefabs/Vehicles/Wheeled/UAZ469/UAZ469.et" => bugs out
"{16A674FE31B0921C}Prefabs/Vehicles/Wheeled/UAZ469/UAZ469_uncovered.et" => bugs out
"{B6D330E7E40FE7DD}Prefabs/Vehicles/Wheeled/UAZ469/UAZ469_covered_CIV_forest.et" => fine

Okay, now those that were fine bug out too
Workbench restart makes all work again, I wonder for how long
Yeah.. get used to restarting workbench a lot, it's so bad this patch..
I suspect it could be my resource management after all
Also note worthy if you start messing with custom key inputs (keybinds) you'll have to restart every time you create a new one.

Well, it is indeed a certified Arma modding experience
So yeah, stuff breaks after scripts recompilation
I store resources, entities and the world right in the menu class in this test, must be that
override void EOnFrame(IEntity owner, float timeSlice)
{
currentime += timeSlice;
if (currentime >= 60.0)
{
// your func.
currentime = 0;
}
}``` thankyou @candid garnet I think timer like this would work.
Should be currenttime -= 60; ☝️🤓
why explain please
No real reason, just not to lose milliseconds
Should definitely be += timeSlice
i think he mention currentime = 0; this part
Yeah, meant after 60 seconds passed
And you'd still want to set it to 0 after.
In 20+ years I've never seen anyone do -= 60
But you do you lol
currentTime += -60
Slap some modulus in there while you're at it
Anyone have tips for how I might get the SCR_CampaignMilitaryBaseComponent from a SCR_SupplyComponent, if that supply component is located in a base? Trying to navigate the moving pieces of the supply system is a bit tricky.
Right now my problem is, I have a component but its root parent is the sign entity.
My end goal is to identify if the supply component belongs to a supply cache or particular faction's base.
Yes
is there an easy way to test and create layouts that will be used on a rendertexture or is it really just a guessing game 
it depends on the logic. setting jt to 0 will cause the timer to drift over long period of time, which in most cases is not desired
move them out of the render target widget and set the workspace dimensions to a square (if you project them on a mesh)
@craggy jolt this is why the first thing i explaines in the anim bootcamp #3 is to always test things with DS tool instead.
As you get rid of WB caching things, which to the naked eye is not always apparent why and how
That way you get a direct fresh testing environment
Ps, DS tool. Not peer tool. They are not the same
Peer tool uses wb which will stay cached if it happened
Peer client stopped working for me with WB localhost so i'm forced into DS 
Why so overcomplicated? Just make a button to disable caching.
You have to do this because if you dont then it wont work because of this other thing. Just make stuff work, dude.
There's caching? That might explain why world editor is a dud for me now, every time I boot in with it I have to close the tools entirely.
And making a clear cache button is impossible to implement?
worst trade deal in the history of trade deals
There are some additional issues. For instance, you cannot recompile while the animation editor is open.
I'm gonna be honest, this patch is brutal, it's a death sentence for WB right now. Borderline unusable.
Speaking of animation editor. I got this and whole WB frozen within 5 minutes of starting to work on a project.
I have insane respect to BI for being able to build Reforger up until now with how ludicrously bad the tools are.

It's technically fine, once you figured out its quirks 😅
Internal version is always more stable
That makes sense. In retrospect I don't think the team would still be around if it was as bad as what I have to go through. And then you guys ask me why I don't want to bother with MANW.

Isn't exp behind right now 😅
As opposed to stable? Weird name considering
Thats an excuse btw. Would be better if the tools didn't crash and revert my changes. Or at least tell me what's going wrong instead of crashing with zero logs or showing error boxes with zero content.
Whenever that happens, remeber what you did and report
Otherwise hard to fix or realize
Also do not ignore the crash window if it appears
How about test your software before you ship it
Its tested
But we do not use every combination possible tjay you might do
Its impossible with complex software
Oh I'm just venting dw
I have limited time to work on hobbies. If I sit down to do something and see an error box with no content within 5 minutes along with complete freeze of the program, I turn it off and go do something else.
They probably a special category of testing json stuff because of you bacon 
I dunno about the testing part. Somehow they shipped a version of the game that freezes when a round completes. They didnt play the game for an entire round before shipping?
It is, since it freezes
I can't use linux because my partner is a dummy 
Well on Windows it will be a bit more stable, that 5% performance loss is probably worth it for stability
Get 5% better hardware 
Until this patch performance has never really been an issue, stable 60 but for whatever reason it's all over the place this patch for the first 5 hours then after that it smooths out back to 60
If you are on Windows then Intel CPU will run Reforger faster
If you are on AMD CPU then Lunix runs it faster
I almost delayed shipping a box off cause I wanted to cram a 9950X3D in it but good thing I didn't
first batch is duds apparently
What
cpu prices
Idk which one is the 7950x3d
last one
no way
ok so they went up a bit
They've been $699 for awhile and I've only ever seen it in stock there.
That'd be a bit weird since the msrp was originially 659 
I'll have a 9950x3d by this weekend but that's for personal use.
Get me off this time bomb known as intel 
GAMESTOP??
rip gamestop
I still couldn't figure out what kind of operation MatrixInvMultiply3 does 😅
I thought my math was off, but turned out if I use MatrixGetInverse3+MatrixMultiply3, I get what I originally wanted to calculate.
I'm tracking inputs, I saw in here and in examples on the workbench that you need to activate the actions context every frame. I'll try sa-matra and yeeters suggestions later today. But if you have any then I'm all ears!
A lot of the base game code also doesn't follow best practices. In proper ECS, systems are meant for game logic and components for data. As Hypoxic told you, you should implement the frame handler with a system.
To provide more reading material for systems:
https://en.m.wikipedia.org/wiki/Entity_component_system
It was kinda daunting at first, but it makes sense when it clicks.
Entity–component–system (ECS) is a software architectural pattern mostly used in video game development for the representation of game world objects. An ECS comprises entities composed from components of data, with systems which operate on the components.
ECS follows the principle of composition over inheritance, meaning that every entity is...
^ I feel like I understand this concept reasonably well. Im newish it oop but not scripting in general, and have used Unity for awhile which uses a component system.
Im using the scripted camera free fly script as an examply and it just calls a method from its OnFrame loop.
Is that just wildly wrong then? Could you elaborate a bit on what you mean by using a system?
In ECS, you would register this camera to a system that does the frame handling. If you have specific member variables that the system operates on, you can make a component on the camera that stores said data.
A typical example is how we implemented the cardiovascular system. While a character is alive it has a cardiovascular component registered at the cardiovascular system. The system iterates over all registered components and updates them.
Or
Just do it in some way thats convenient for you and works
Most mods dont need to bother with systems
Maybe specifically for the camera you could argue that a system is overkill, as you will never have to operate on more than one camera
No clue what the guy is making tho
I'm re-creating the free fly camera's controls so that I can use it while a dialog is open. Since the dialog is accepting inputs, none of my inputs reach the camera in the background, so im catching the inputs and manually transforming the camera
Because the camera isnt recognizing inputs, im not sure a component on the camera would work. It would probably have to be on the UI instead....
Though separation of concerns would be an argument for systems here. The camera already does camera stuff, so a system responsible for handling the controlling would make sense.
https://feedback.bistudio.com/T184746 I guess not fixed in 1.3
@dire sinew Would you know of any examples or documentation I can reference for the type of systems you're talking about within reforger?
As for documentations, see the link Hypoxic sent.
it has not been worked on yet, i have raised it again. We have a larger backlog of "smaller" tickets we are trying to fit between the bigger tasks so they do not sit on the bench for months. Thx for your understanding. Do keep making tickets please though, we eventually get to all of them
Are crashes like these not on top of the list?
Re-asking a question from last night: Anyone have tips for how I might get the SCR_CampaignMilitaryBaseComponent from a SCR_SupplyComponent, if that supply component is located in a base? Trying to navigate the moving pieces of the supply system is a bit tricky.
Right now my problem is, I have a component but its root parent is the sign entity.
My end goal is to identify if the supply component belongs to a supply cache or particular faction's base.
it is sitting in my backlog for later this month, have been busy with other wirk before.
Look into the SCR_CampaignBuildingDisassemblyUserAction for Building provider code. Building provider is usually the entity that has MilitaryBaseComponent. It'll be that or doing a search query for entities with XX component in X radius which is the ugly way.
I’d say the only downside to systems only approach is some things can only be perceived or done by clients. So calculations could be done by system but it depends on certain information.
Like if you need something very precise like player control, for example, having it go through a system subjects it to packet loss or an unreasonable delay.
You can have a client-only system though
@dire sinew the hard ref in my map was the issue, thank you!
Great tip, thank you. I was actually poking around that code but didn't even consider it for this purpose lol
Is there any unobvious caveats in using RplComponent's Auto Hierarchy tick? Or is there any substantial reasons why it should not be used? I'm doing a lot of child-parent assignments/unassignments and this thing looks like it could save me a ton of headache.
Anyone have debugger tricks for visualizing entity/component hierarchy? Or even just seeing the concrete instance type of a GenericEntity or IEntity ?
That is for entity hierarchy
About component and such, there is none except for checking it in the prefab itself
Thank you so much
on the topic of the diag menu, are you supposed to hold CTRL+WIN the entire time you engage it? or should it be toggle? using arrow keys switches virtual desktop space when using the world editor lmao
i feel schizo switching VDs all the time
use LCtrl + Win + LAlt
thank you. idk how frequently people are browsing this channel but I know I've been asking a ton of questions and appreciate all of the helpful responses. Picking up a lot very quickly
That is what this channel is for 🙂 Feel free to ask
Don't try. The math is borked on it
No, it's on radar already
Now to show off the fruits of my labor + your folks' help



