#enfusion_scripting

1 messages · Page 3 of 1

torn bane
#

I will ask if the person who made if they can update it to a functional example state with AR assets. What is your end goal with it? For what situations do you need a custom assortment in the preview world? To display it in a static GUI or do you need to update it constantly via render target?

minor agate
#

||You have to do a rain dance in game and spawn a black hole||

open pier
night harbor
#

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 ?

coarse pasture
#

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

dapper warren
#

What is the best way to instantiate a global class in the server that keeps track of entities spawned by users?

visual atlas
#

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?

ocean kernel
#

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)

visual atlas
#

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

ocean kernel
#

from SCR_BaseActionsEditorComponent you could look into GetManager().GetPlayerID() serverside

visual atlas
#

ooh yea and i see the action itself has a m_ActionsManager that is the BaseActionsEditorComponent

#

thanks!

reef aurora
#

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

visual atlas
# ocean kernel from `SCR_BaseActionsEditorComponent` you could look into `GetManager().GetPlaye...

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);
    }
}
west prism
#

How do you give the helicopter unlimited rockets?

placid crag
coarse pasture
placid crag
#

As the problem is related to ui

river imp
reef aurora
river imp
#

Yeah, it's not like any of us would. Unless we made the mod or used it.

craggy jolt
#

Now trying to get RTTextureWidget to display anything

coral sorrel
#

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

river imp
#

Not sure what you've done but, this works correctly.

dapper warren
#

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

fringe prairie
#

Does it work without peer tools (just hit play in world?)

dapper warren
#

Yes, it fails on dedicated server tool or peer tool

torn bane
dark ocean
red escarp
#

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

dark ocean
coral sorrel
# river imp ```cs [ComponentEditorProps(category: "GameScripted/Misc", description: "")] cla...

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

Watch "LM eonactivate" on Streamable.

▶ Play video
livid forum
sweet badger
#

Is there a way I can get references to all currently present characters or AI agents, without storing them myself on creation?

coral sorrel
edgy field
#

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);
pliant ingot
#

or you can just call it two times for each event)

gloomy lynx
#

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

torn bane
#

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

gloomy lynx
#

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?

late locust
#

How does one make a multiline string?

torn bane
#

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

torn bane
late locust
gloomy lynx
#

im kinda sick of playing guessing games here

#

im sure many people are

#

you guys got documentation on almost everything else.

torn bane
#

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.

gloomy lynx
#

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?

torn bane
#

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.

minor agate
minor agate
#

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

gloomy lynx
coral sorrel
minor agate
#

(Items are not kept spawned unless visble for a while now)

#

So if you took it directly to inv, those things wont be called.

minor agate
#

Dont bank on that as a signal that its being used

timid citrus
#

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.

ocean kernel
#

Hows progress on making servers not use 100 TB bandwidth per month?

torn bane
timid citrus
coral sorrel
# minor agate It activates on the others as it makes it active for whatever reason

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.

minor agate
#

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

coral sorrel
# minor agate But why do you need EOnActivate to begin with?

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.

minor agate
#

It will give you more problems than this

minor agate
gloomy lynx
#

if someone can dig into my mod and figure out my flooded issue, ill make you any car\truck you want

minor agate
#

You probably will need to mess with Player Controller or Character command handler

#

If you want to implement custom weapon type of sorts

edgy field
#

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.

minor agate
#

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

coral sorrel
edgy field
#

Yeah I mean I was looking at the docs and the guy was using lifecycle methods of a entity within a component

minor agate
#

@edgy field In the replication modding bootcamps we used systems

#

there are two of those

edgy field
#

That didn't really make sense to me cause SetEventMask expects an IEntity. But the EOnFrame is being used in the component

minor agate
edgy field
#

And now somehow the component is relying on the Entity's lifecycle methods?

minor agate
#

It should be uploaded tomorrow.

minor agate
#

Better to do it through systems

edgy field
#

I will

minor agate
#

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

coral sorrel
minor agate
#

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)

edgy field
#

Ok I will, it just looked like everyone was doing it the behavior-within-entity way

minor agate
#

So things were done with what we had

#

But now we have them, and a more robust system impl to use is coming even

gloomy lynx
#

how about a log level just for rpc debugging

#

😄

minor agate
#

also on WB

#

open diag menu, and mess with the Replication and Networking debugs

#

You won't see it on normal ones

gloomy lynx
#

ive never gotten replication flooded from peertool or ds tool

#

only on a live server

minor agate
#

I have a feeling that someone is just attacking your servers through a game exploit like it has happened in other games

gloomy lynx
#

so spamming some bogus datapacket that looks like a rpc call?

minor agate
#

If it's really not a messed up mod

minor agate
#

Anyway stop flooding the channels here

#

I already told you that I would check

gloomy lynx
#

i apologize

#

sorry

hollow oak
#

hi! A silly question but, can a vehicle drive by premade coords. Like a train, following the railroad vector coords?

timid citrus
#

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

open pier
open pier
minor agate
#

You have to use Diag client and diag server. Or workbench

gloomy lynx
#

so say me and him are getting attacked, what can we do?

#

if its not anything on our end

minor agate
#

😅

#

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

gloomy lynx
#

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

minor agate
open pier
minor agate
#

Stop asking for it or messing with spamming it here

vernal moat
# minor agate Just wait on it

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)

minor agate
#

and diag client

#

Then you could.

#

Just beware that it will be open to hackers, but for testing is fine

open pier
minor agate
gloomy lynx
#

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

minor agate
#

So i f you want to test with your community, tell them to launch that .exe

#

instead of the non diag one

open pier
minor agate
#

And if we did, the performance of the replication system would be way worse

#

and also the game's

gloomy lynx
#

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

minor agate
#

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

open pier
#

or is there anyway to utilize the diag classes in our mod to debug this?

minor agate
#

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

open pier
minor agate
#

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.

open pier
#

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

minor agate
#

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

open pier
#

nvrm i see the Feedback tracker is where

minor agate
#

@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

gloomy lynx
#

ok so if we do that and we see a ton of data what do we do next

minor agate
#

In this menu

minor agate
#

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

gloomy lynx
#

alright ill try it out

open pier
#

Yee time to get a diag server setup, thank you Mario

minor agate
#

@gloomy lynx @open pier You will have to make them connect through IP btw

#

Also, only PC

open pier
open pier
dapper warren
#

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

dapper warren
#

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?

minor agate
#

In normal server, no render so no cameras

#

And expect anything render related to not be there

minor agate
# dapper warren How can I guarantee that a component is client-side so I can calculate the rayca...

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...

▶ Play video

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...

▶ Play video
dapper warren
#

I watched those :/ is just a bit confusing right now

minor agate
#

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.

high hawk
dapper warren
#

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

minor agate
dapper warren
#

I was thinking that anything outside an Rpc ran on the client

open pier
#

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

visual atlas
#

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

dapper warren
#

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

gloomy lynx
#

this is local

#

this is server

#

im not asking whats wrong by showing you those screenshots, thats just whats going on

minor agate
#

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

dapper warren
#

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

minor agate
#

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

gloomy lynx
#

in the case of the serverdiag.exe where does it save the edf database?

#

cant seem to find it

minor agate
#

Idk where Arkensor made it save things at. I have never used it

#

Probably on some other profiles folder for it

gloomy lynx
#

usually its in the profile but it looks liek the diag.exe doesnt create a profile folder

dapper warren
#

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!

minor agate
gloomy lynx
#

yes

minor agate
#

If so then it might just default to WB's

#

Unless you told it to use specific profile's folder

minor agate
#

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

dapper warren
#

Thanks!

west prism
#

Are the scripts used in the VFX video from 2 years ago outdated has the language been altered or updated since then? Functions changed?

timid citrus
#

Er not him but somebody

#

Server/saves/profile/.db/yourdatabasename

#

.dB is hidden folder

#

@gloomy lynx

gloomy lynx
visual atlas
fringe prairie
#

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.

thorn anchor
#

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?

tough cave
#

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

late locust
#

How do I get my json bool to not convert to 0/1? I need it to be false/true

ocean kernel
#

Are you using JsonApiStruct?

late locust
#

Yeah

ocean kernel
late locust
#

Currently I just set it to -999 and dataString.Replace("-999", "false");. Clearly the intended way hmmyes

ocean kernel
#

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

late locust
#

Why do I even read the wiki if its all unusable info 💀

ocean kernel
#

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

late locust
#

Thats the important info that need to be on the wiki

fringe prairie
#

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

edgy field
#
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?

river imp
#

Yes, add it to the game system config

edgy field
#

Figured it out.

minor agate
#

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

fringe prairie
#

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

dapper warren
#

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?

edgy field
#

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.

dapper warren
edgy field
#

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.

dapper warren
#

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

rich current
#

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%)

edgy field
dapper warren
edgy field
#

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

ocean kernel
#

Where can I get some help about crash report? I have once again hit the common Crash WB With Zero Logs situation

sweet badger
#

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

fringe prairie
#

if you can find a way to get that data on server

rich current
#

Someone can help with this Error ?

river imp
rich current
west prism
#

can somebody help to get worked loot spawn

versed remnant
# rich current Someone can help with this Error ?

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

gloomy lynx
#

anyone getting infinite hang on logout of a server, hangs on arma logo until you end the process

timid citrus
#

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

acoustic nimbus
solid hearth
#

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... eeeh

copper badge
#

Can we request Wiki on how this systems works as well. Would be amazing ❤️ ^

fringe prairie
#

Otherwise not sure haha

solid hearth
#

eeeh that seems kind of lame because both are separate entities being attached to the rack system

#

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..

inland bronze
# acoustic nimbus There's a usage on his github https://github.com/CashewSan/Central-Economy/tree/...

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 😄

Arma Reforger

Central Economy allows for dynamic spawning of items around a map with a master config file!

#

Question, with AttachmentSlotComponent, how do I set which other attachment slot it obstructs? Do I have to do that in script somehow?

azure sky
#

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/)
wind leaf
#

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.

minor agate
# coral sorrel ya I was waiting for it to come out, I missed the first half of the presentation...

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...

▶ Play video
midnight talon
craggy jolt
#

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?

analog python
solid hearth
#

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 currentweary

analog python
#

We didnt expect to have to keep armaments going, our intention was to replace it with these new vanilla systems too

solid hearth
#

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 peepoYay

analog python
#

More work for me yippee ropp

solid hearth
#

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 thenking

analog python
open pier
craggy jolt
open pier
late locust
#

How do I convert the translation key to the actual name via code? Like #AR-...

tawny lotus
tawny lotus
#

Is there a way to query all prefab names (and their resourcenames) under a certain directory (e.g., \Prefabs\Rocks*.et)?

late locust
tawny lotus
#

I want to do this on dedi server.

late locust
#

Not sure if there is one that works runtime.

keen stag
#

is there a way to know if the player is inside a FOB ?

analog python
inland bronze
west prism
#

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

river imp
#

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.

river imp
inland bronze
#

hmmm, guess not what I need then

river imp
ocean kernel
#

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

cosmic mango
#

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.

torn bane
# west prism

you inherit from the wrong classes, please check the readme/docs folder of my mod again carefully.

river imp
ocean kernel
river imp
#

SCR_WorldEditorToolHelper.SearchWorkbenchResources and ResourceDatabase.SearchResources clearly won't work.

#

I suggested FileIO

ocean kernel
#

Yes, FileIO won't work on dedi to read contents from addons

river imp
#

And I also said that I hadn't tried.

tawny lotus
#

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.

torn bane
river imp
#

Oh nice

#

@tawny lotus ^^

cosmic mango
# fringe prairie Look at GUI video

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?

tawny lotus
river imp
late locust
#

Why does this shuffle example not work? blobdoggoshruggoogly

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

river imp
#

try new ref MyClass()

late locust
#

I heard new ref is bad

river imp
#

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.

late locust
#

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 notlikemeow

river imp
#

array<ref MyClass> values = new array<ref MyClass>();

late locust
#

Thats the same as {}

river imp
ocean kernel
#

50% of the time it works all the time

late locust
#

Works all the time when I copy all the logic and use it myself

river imp
#

Lol

late locust
#

Thanks

#

But the example of the none ref version is still wrong

river imp
#

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

minor agate
candid garnet
#

possible to make something a public get but private/protected set like in c#?

azure sky
candid garnet
river imp
#

Thanks for telling us for the millionth time. Lol

minor agate
#

I just put it there everytime it is mentioned because of the newbies that might just take it

candid garnet
river imp
vernal moat
dapper warren
#

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?

teal vapor
#

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.

dapper warren
fringe prairie
#

Or something like that not on computer

teal vapor
# dapper warren https://community.bistudio.com/wiki/Arma_Reforger:Systems

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?

dapper warren
# teal vapor So a question about this. I was looking through classes that derive `GameSystem`...

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

teal vapor
dapper warren
#

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

candid garnet
teal vapor
# candid garnet 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

open pier
teal vapor
#

ty for the input

open pier
candid garnet
#

how do i register a system that is derived from a common class? what's the work around since its not supported yet

river imp
teal vapor
teal vapor
#

sorry I meant that I am specifically seeking out the reforger content and not mixing and matching

craggy jolt
#

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:

  1. Separate world, spawn with SpawnEntityPrefab, but this won't work on clients
  2. 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

craggy jolt
candid garnet
# river imp What?

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

craggy jolt
#

I see it has ResolvePreviewEntityForPrefab, gonna try with it

candid garnet
river imp
#

There is no workaround. Inherited classes don't work.

craggy jolt
#

Oh, there is SpawnEntityPrefabLocal thonk

#

Welp, it works, except workbench crashes after I end the game.

torn bane
ocean kernel
#

Yeah I need to dial down time spent modding since it crashes so much in 1.3 I'm blocked on like 3 projects

flint fog
#

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)
    }
dire sinew
torn bane
#

Ah great, we already have those changes out, forgot. Yes the wiki page explains whats the deal with it 🙂 Thx for the link kex

frosty coral
#

Is there any ETA on new systems? Is it like 1.4-1.5 or Arma4 timeframe?

torn bane
frosty coral
#

Do these additional changes include WorldControllers?

ocean kernel
#

Do they include less WB crashes

#

😭

torn bane
# ocean kernel Do they include less WB crashes

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.

ocean kernel
#

What time of day should I post them at for maximum chance of being looked into?

inland vector
#

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

solid hearth
#

The real question is when are we going to get the ability back to change classes in slotmanager screamcry

timid citrus
fringe prairie
fringe prairie
#

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

solid hearth
fringe prairie
# flint fog Hello everyone, this is a question that anyone may have encountered. I have crea...

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
}
fringe prairie
#

There are some things that just absolutely cannot run on a console app like dialog windows, even though it will let you try haha.

minor agate
#

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.

ocean kernel
#

ref MarioE

#

protected ref SharedItemRef MarioE

#

Double ref

fringe prairie
minor agate
minor agate
#

(Yes, reference is a keyword)

fringe prairie
#

Coming from JS, pointers are still a weak spot of knowledge for myself. JS let me cheat a lot in this aspect

ocean kernel
#

return new ref SharedItemRef GameSystem(new ref MarioE);

ocean kernel
#

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

ocean kernel
#

This crash is probably something to do with refs db2a7b1e-6f40-4cf9-b78d-f7cf496a6ae6

storm bobcat
#

Where are the compositions for conflict listed?

pliant ingot
west prism
lofty stag
#
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

fringe prairie
#

Sanity check:
A given RplComponent's Id (RplId) will or will not match between proxy and the authority perspective?

storm bobcat
west prism
#

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.

candid garnet
#

how do i grab the character's player name?

teal vapor
#

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 Sadge

fringe prairie
teal vapor
fringe prairie
#

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?

fringe prairie
fringe prairie
opal copper
fringe prairie
gloomy lynx
#

that already exist in el\epf\edf

keen stag
#

is there a way to know if the player is in Game Master?

reef aurora
west prism
fringe prairie
gloomy lynx
#

whats this

SCRIPT (W): @"Scripts/WorkbenchGame/ScriptEditor/SCR_NewScriptPlugin.c,112": 'GetAddonIndex' is obsolete: Use GetAddonID instead

#

why is vanilla using obsolete stuff

fringe prairie
#

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

gloomy lynx
#

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

fringe prairie
#

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

gloomy lynx
#

its edf epf and el

#

and anything that depends on them

fringe prairie
#

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

gloomy lynx
#

this isnt a broad case, he also has minimal specs to play reforger but it still shouldnt be happening

fringe prairie
#

and that is more of a game issue of loading mods than something wrong with any scripts

gloomy lynx
#

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

fringe prairie
#

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.

gloomy lynx
#

its a single case of this happening, ive been trying to diagnose what was causing our rpl floods the past 2 days

fringe prairie
#

have you seen arkensors post?

gloomy lynx
#

is it recent/

fringe prairie
#

this one

gloomy lynx
#

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.

fringe prairie
#

You are correct that it shouldn't be. Some times people are cursed haha. I really need to start adding to my wiki

west prism
gloomy lynx
west prism
#

so u can dupe all starting vehicle loot

gloomy lynx
west prism
#

ok i take a look

gloomy lynx
#

does that compile?

west prism
topaz locust
#

Action activated procedural animations seem to have been bugged out on servers since the 1.3 update. Has anyone else run into this issue?

flint fog
# fringe prairie You could probably change that method to add RPC like so: ```cs void UpdateHUDTe...

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?

flint fog
fringe prairie
#

You can have two rpl props point to same update function if you want

flint fog
frosty coral
#

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
frosty coral
#

Also Entities involved are loadtime and do NOT have their rpl state overriden to "runtime"

torn bane
frosty coral
#

But thanks anyway

torn bane
#

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

frosty coral
#

yes, but what if they are loadtime? are they still different?

#

because i'm only interested in loadtime for my case

torn bane
#

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).

minor agate
#

only EntityID and WorldTimeStamp (When it comes to the handle64 ones) have the rpl codec stuff

#

Something happened in the way

frosty coral
#

Maybe i misunderstood

minor agate
#

In loadtime, you can rely

frosty coral
#

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?

torn bane
minor agate
#

It would break everything else

#

But that is not his issue

#

Something else happened, and want to know what broke

frosty coral
frosty coral
fringe prairie
minor agate
fringe prairie
#

Figured, I had an issue myself with them a while ago but not for this reason

ocean kernel
#

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

frosty coral
frosty coral
# minor agate Share whole code pls.
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());
}```
ocean kernel
#

Also I am going to insert refs everywhere out of spite for not being able to pass functions as parameters

ocean kernel
#

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

dire sinew
#

Mathematically speaking, what kind of operation does Math3D::MatrixInvMultiply3 do?

minor agate
dire sinew
#

So A * B^-1?

minor agate
minor agate
#

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

minor agate
dire sinew
#
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?

frosty coral
ocean kernel
#

How big can be the string sent as output of server command

dire sinew
# frosty coral Thanks for checking

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

GitHub

Open-source realism mod for Arma Reforger. Contribute to acemod/ACE-Anvil development by creating an account on GitHub.

late locust
ocean kernel
#

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

late locust
#

Guess ill change to string + string then

#

Oh wait code says max 8191 chars

static vale
#

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

ocean kernel
late locust
#

Also why 1023 and not 1024

late locust
frosty coral
dire sinew
frosty coral
dire sinew
#

IEntity newChild = IEntity.Cast(Replication.FindItem(newChildRPLID));
Where do you execute this code? Could be that you do it too early where the RplComponent isn't done with the init yet

river imp
#

Gotta make sure the client has its values updated ^

desert escarp
#

What is the difference in server environments from dedicated servers, workbench and the local scernarios in game

static vale
desert escarp
#

It seems my methods work in workshop and dedicated but does not in the scernario browser in game

dire sinew
frosty coral
#

do rplIds always exist on a client or they are streamed in?

desert escarp
#
    #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

frosty coral
river imp
#

When?

dire sinew
#

The client will return null for streamed out entities...

frosty coral
#

at arbitrary moment, not 0.001 after game start

late locust
frosty coral
#

ok, so sounds like the entity is not streamed in

dire sinew
#

Or again you do it too early

frosty coral
#

definitely not too early

dire sinew
#

You still refuse to tell us though 😅

frosty coral
#

that's why i'd rather use EntityID

river imp
#

You say that and then refuse to tell us

river imp
minor agate
#

Whwre do you do it

#

EONinit?

#

Of what

#

Where

#

When

river imp
#

Exactly ^

late locust
#

Show code

frosty coral
#

Oh, ok

wise shell
#

Since im new to this,
How would one get currently running MissionHeader in remote console?

river imp
#

Could do that they aren't streamed it

frosty coral
#

in the onRplName

minor agate
#

Share the project 😅

frosty coral
#

in the component

river imp
#

Lol

#

Don't want anyone to steal his super secret scripts

dire sinew
# frosty coral in the onRplName

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.

frosty coral
#

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

dire sinew
#

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.

frosty coral
dire sinew
#

I am talking about replicated entities.

frosty coral
#

i'm dealing only with loadtime

dire sinew
#

but they are still replicated

frosty coral
#

having loadtime EntityIDs are always the same on the server and client i can at least always find an entity on a client

dire sinew
#

You cannot if said entity is streamed out

frosty coral
late locust
#

I never got EntityID to work, I just use rplComp.Id()

dire sinew
#

We do use EntityID without issues, but for unreplicated loadtime entities.

#

As I said, we use a wrapper to replicate an array of EntityID

dire sinew
# frosty coral i'm dealing only with loadtime

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.

frosty coral
dire sinew
#

Or you still use RPL IDs, but make the entities register to your system when they are ready.

frosty coral
frosty coral
dire sinew
#

It does sound anyway somewhat like what you are doing is probably best realized with a system 😅

frosty coral
candid thicket
#

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'?

dire sinew
#

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.

candid thicket
dire sinew
#

Inside your project's folder. The other folders are read-only anyway.

candid thicket
#

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?

dire sinew
#

yes

thin lynx
#

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?

teal vapor
thin lynx
#

realise i put this in enfusion and not arma 3...

#

my bad!

teal vapor
#

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?

ocean kernel
#

That's a lot of data

teal vapor
#

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

ocean kernel
#

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

high hawk
#

Bacon.json

ocean kernel
#

buffer overflow

teal vapor
#

I used to work on low level systems (hypervisors/kernels) so unnecessary micro optimizations are usually on my mind

thorn anchor
#

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?

teal vapor
#

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.

thorn anchor
#

Trying to have notification that stack when there is multiple of them. but im struggling.

open pier
dire sinew
minor agate
#

I give it another year until we reach that level

open pier
dire sinew
teal vapor
ocean kernel
teal vapor
#

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.

dire sinew
#

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.

teal vapor
#

Ahhhh root parent is what I was missing. I was trying to override a child and didn't see the option to do so

#

and thank you for the input Kex, very helpful info

dire sinew
teal vapor
#

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?

dire sinew
#

You should show us what you did. Just making an override without any changes shouldn't break anything.

teal vapor
#

sorry for the noise, no idea what the deal was.

pseudo merlin
teal vapor
#

went through the steps again and it was all good

pseudo merlin
#

Alright.

past berry
#

How do I get limbs position such as left arm, right foot, etc. in the game world?

dire sinew
#

IEntity::GetBoneMatrix should do the trick

thorn anchor
# dire sinew Can you show a small example where you think the insertion fails?
    {
        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.

topaz locust
#

What's a good way to get whether a hitzone has started regenerating. The way I've been trying doesn't seem to work

copper badge
#

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

frosty coral
#

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
desert escarp
#
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

frosty coral
desert escarp
thorn anchor
#

any clue on how AnimateWidget.Value works?

dire sinew
dire sinew
thorn anchor
#

so all the enums will have a value of 0 unless I assign them?

#

or will they be auto assigned 0+

dire sinew
#

Yes, if you just define ESomeType myVar;, myVar will be 0

thorn anchor
#

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.

dire sinew
#

Can you please provide a full example that can be run. How should I know what you pass to ShowStackableNotifications...

thorn anchor
#

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.

dire sinew
#

Just make a simple self-contained example that showcases your issue

frosty coral
thorn anchor
# dire sinew Just make a simple self-contained example that showcases your issue

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,
};```
past berry
#
{
    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.

pliant ingot
#

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

candid garnet
outer chasm
#

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();
}

};`

open pier
dire sinew
red escarp
#

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?

teal vapor
#

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

thorn anchor
#

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?

shadow oxide
#

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

craggy jolt
#

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

candid garnet
solid hearth
# craggy jolt So I'm creating two UAZs with `SpawnEntityPrefabLocal` inside a newly created wo...

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 PepeKMS 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.

craggy jolt
solid hearth
#

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.

craggy jolt
solid hearth
#

hmm 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*

craggy jolt
solid hearth
#

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 cute_smile_cat_meme

craggy jolt
#

"{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

solid hearth
craggy jolt
#

Okay, now those that were fine bug out too

#

Workbench restart makes all work again, I wonder for how long

solid hearth
#

Yeah.. get used to restarting workbench a lot, it's so bad this patch..

craggy jolt
#

I suspect it could be my resource management after all

solid hearth
#

Also note worthy if you start messing with custom key inputs (keybinds) you'll have to restart every time you create a new one.

craggy jolt
#

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

past berry
#
    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.
craggy jolt
#

Should be currenttime -= 60; ☝️🤓

past berry
craggy jolt
river imp
#

Should definitely be += timeSlice

past berry
craggy jolt
#

Yeah, meant after 60 seconds passed

river imp
#

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

ocean kernel
#

currentTime += -60

solid hearth
#

Slap some modulus in there while you're at it

teal vapor
#

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.

solid hearth
#

thenking 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 Dead

dark ocean
ocean kernel
#

move them out of the render target widget and set the workspace dimensions to a square (if you project them on a mesh)

minor agate
#

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

solid hearth
#

Peer client stopped working for me with WB localhost so i'm forced into DS pepegaGrin

ocean kernel
#

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.

minor agate
#

Because if we do not csche things

#

Then you will complain about mega slower wb

solid hearth
#

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.

ocean kernel
#

And making a clear cache button is impossible to implement?

solid hearth
#

worst trade deal in the history of trade deals

dire sinew
#

There are some additional issues. For instance, you cannot recompile while the animation editor is open.

solid hearth
#

I'm gonna be honest, this patch is brutal, it's a death sentence for WB right now. Borderline unusable.

ocean kernel
#

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.

dire sinew
#

It's technically fine, once you figured out its quirks 😅

minor agate
solid hearth
#

I'll take one please.

#

server pdb as well

#

thanks

ocean kernel
#

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.

minor agate
#

You would suffer less if you used exp tbh

#

Bug fixes faster

dire sinew
#

Isn't exp behind right now 😅

ocean kernel
#

As opposed to stable? Weird name considering

minor agate
#

Exp is more as preview

#

Mostly there for modders to be ahead for when srable updates

ocean kernel
#

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.

solid hearth
#

I prefer to wake up one morning and see everything that breaks at once.

minor agate
#

Otherwise hard to fix or realize

#

Also do not ignore the crash window if it appears

ocean kernel
#

How about test your software before you ship it

minor agate
#

Its tested

#

But we do not use every combination possible tjay you might do

#

Its impossible with complex software

ocean kernel
#

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.

solid hearth
#

They probably a special category of testing json stuff because of you bacon hmm

ocean kernel
solid hearth
#

Just make a game mode that never ends

#

Problem solved

ocean kernel
#

It is, since it freezes

solid hearth
#

Guess I lucked out on that fun issue since mine never ends peepoCLAppers

ocean kernel
#

Dw it'll freeze on linux servers eventually

#

But for completely unrelated reasons

solid hearth
#

I can't use linux because my partner is a dummy PepeKMS

ocean kernel
#

Well on Windows it will be a bit more stable, that 5% performance loss is probably worth it for stability

solid hearth
#

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

ocean kernel
#

If you are on Windows then Intel CPU will run Reforger faster

#

If you are on AMD CPU then Lunix runs it faster

solid hearth
#

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

ocean kernel
#

I'll find out this week

#

atm 9800X3D > 7950X3D > 9950X

solid hearth
#

yeah but $545 > $575 > $700

ocean kernel
#

What

solid hearth
#

cpu prices

ocean kernel
#

Idk which one is the 7950x3d

solid hearth
#

last one

ocean kernel
#

no way

solid hearth
ocean kernel
#

ok so they went up a bit

solid hearth
#

They've been $699 for awhile and I've only ever seen it in stock there.

ocean kernel
#

They cost $500 once

#

For a bit

#

Well nvm

solid hearth
#

That'd be a bit weird since the msrp was originially 659 thenking

#

I'll have a 9950x3d by this weekend but that's for personal use.

ocean kernel
solid hearth
#

Get me off this time bomb known as intel PepeKMS

ocean kernel
#

it go up

#

stonks

solid hearth
#

GAMESTOP??

ocean kernel
#

rip gamestop

dire sinew
#

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.

shadow oxide
dire sinew
#

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.

candid garnet
# shadow oxide I'm tracking inputs, I saw in here and in examples on the workbench that you nee...

To provide more reading material for systems:

https://en.m.wikipedia.org/wiki/Entity_component_system

https://community.bistudio.com/wikidata/external-data/arma-reforger/EnfusionScriptAPIPublic/Page_WorldSystems.html

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...

shadow oxide
#

^ 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?

dire sinew
#

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.

ocean kernel
#

Or

#

Just do it in some way thats convenient for you and works

#

Most mods dont need to bother with systems

dire sinew
#

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

ocean kernel
#

No clue what the guy is making tho

shadow oxide
#

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....

dire sinew
#

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.

shadow oxide
#

@dire sinew Would you know of any examples or documentation I can reference for the type of systems you're talking about within reforger?

dire sinew
#

As for documentations, see the link Hypoxic sent.

torn bane
late locust
#

Are crashes like these not on top of the list?

ocean kernel
#

What happened to that parachute not saving in arsenal ticket I made

#

Mr Arkensor

teal vapor
#

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.

torn bane
solid hearth
fringe prairie
#

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.

dire sinew
#

You can have a client-only system though

thorn anchor
#

@dire sinew the hard ref in my map was the issue, thank you!

teal vapor
frosty coral
#

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.

teal vapor
#

Anyone have debugger tricks for visualizing entity/component hierarchy? Or even just seeing the concrete instance type of a GenericEntity or IEntity ?

minor agate
#

That is for entity hierarchy

#

About component and such, there is none except for checking it in the prefab itself

teal vapor
#

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

teal vapor
#

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

minor agate
minor agate
dire sinew
#

Should I make a ticket for it?

#

Provided that it was supposed to calculate A * B^-1

minor agate
#

No, it's on radar already

teal vapor