#enfusion_scripting

1 messages · Page 19 of 1

ocean kernel
#

It's running on default settings lmao

torn bane
ocean kernel
#

10 minutes, but it has a lot of entities, mostly AI

torn bane
#

that does not matter, how often a save is created matters

ocean kernel
#

This seems to be the first save the server makes

#

Or tries to

torn bane
#

Check if your server has exsting saves, clear them.

ocean kernel
#

The persistence server config section can be used to turn it off right?

torn bane
#

Yes, save game type to 0 on mission header

ocean kernel
#

Ah I was thinking autoSaveInterval to 0

torn bane
#

No that is not your issue, auto save 10 minutes would survive for long before it has done it 999 times ... existing save points are not clearred because your playthrough never stops

ocean kernel
#

oh

#

so like

#

if you have saved 999 save points

#

you crash at the next one?

torn bane
#

Yes, since I thought nobody would reach it. i have to recycle back to 0

ocean kernel
#

I think this is weird since loading saves doesnt work

#

So it had to run until 999 on one playthrough?

torn bane
#

well look at your save data directory it will tell you

ocean kernel
#

There's only 10 saves in the folder

#

990 - 999

torn bane
#

Yes that does not matter, what does their number say

#

Well then you know, you reached 999. delete the saves

ocean kernel
#

That would mean the server was up for 7 days lol

torn bane
#

or some of your logic spammed save due to capute of base or what ever

ocean kernel
#

Ok thanks, so for now it is safer to have it disabled since you cant load it anyway without mods

forest arrow
#

class ComputerEntity : IEntity
{
protected bool m_bIsTurnedOn; // this value is edited only on authority's side

[RplRpc(RplChannel.Reliable, RplRcver.Server)]
protected void RpcAsk_Authority_Method(bool turningOn)
{
    Print("authority-side code");

    if (turningOn == m_bIsTurnedOn)                // the authority has authority
        return;                                    // prevent useless network messages

    m_bIsTurnedOn = turningOn;

    PlayMusic(turnOn);                            // play music on authority
    Rpc(RpcDo_Broadcast_Method, turningOn);        // send the music broadcast request
    Rpc(RpcDo_Owner_Method);                    // run specific code on the owner's entity (that may or may not be the authority)
}

[RplRpc(RplChannel.Reliable, RplRcver.Owner)]
protected void RpcDo_Owner_Method()
{
    Print("owner-side code");
}

[RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
protected void RpcDo_Broadcast_Method(bool turningOn)
{
    Print("proxy-side code");
    PlayMusic(turningOn);
}

protected void PlayMusic(bool turningOn)
{
    if (turningOn)
        SomeSoundClass.PlayMusic(this, "OSWelcome");
    else
        SomeSoundClass.PlayMusic(this, "OSGoodbye");
}

// public methods

void TurnOn()
{
    Rpc(RpcAsk_Authority_Method, true);
}

void TurnOff()
{
    Rpc(RpcAsk_Authority_Method, false);
}

}

Why I have errors like ComputerEntity.Rpc undefined function? This is the example code from tutorial

fringe prairie
#

Register my world controller with the system (outside of what the game automatically does) so the controller on the client side can give the proper player id and controller stored in a map. But my attempts to play the RPC game with the world controller for this purpose have not been successful haha

#

It’s like the calls are being dropped on dedicated server

fringe prairie
#

Saw this on my modded Map Marker Entity class

#

If you have additional information to replicate that’s where you’d do it

forest arrow
fringe prairie
#

Your class, but it’s interesting that it’s doing that in this situation

#

At work but maybe Mario will pop in and answer better

forest arrow
#

I cant understand your answer, sorry, I'm newbe to enfusion scripting 🙂
Just trying to understand rpl things from tutorial

#

I cant just understand why code sample from wiki doesnt work as is.
Also tried code example from video "Replication Fundamentals" from boot camp, same situation

forest arrow
#

which should be?

minor agate
#

GenericEntity

#

IEntity has not RPC stuff on it

#

Not every entity needs Rpl stuff, expensive and wasteful

#

So if you want that, then you must use GenericEntity

#

Which is an extended version of IEntity

#

IEntity is the barebones

forest arrow
#

Let me try, thanks for now

forest arrow
# minor agate GenericEntity

Scripts/Game/SCR_RandomScenarioManager.c(1): error: Missing Entity Class for 'SF_RandomScenarioManagerClass' for Entity 'SF_RandomScenarioManager'

I just changed IEntity to GenericEntity

#

I found that I need to create also class with GenericEntityClass.
Why do we need that?

minor agate
#

It's a class that defines prefab data for your entity, or component

#

It will let you define dependencies, requirements, etc

#

also it will allow you to have shared data across prefabs

forest arrow
#

and then I can find this prefab in search, right? with this name

minor agate
#

So less memory usage and such, but get on that later when you masted normal prefabs first

#

Just do not forget to also always declare the xxxClass to your xxx entities and components

forest arrow
#

okay. maybe can you point me to documentation for creating prefabs with classes? something like that

minor agate
#

That is just for optimization

forest arrow
minor agate
#

So you need to spawn your entity somehow

#

Either on the world file

#

Or dynamically

forest arrow
#

Yes, thats the question. How I can spawn it? For now I have only .c file. How I can convert it to something, what I can spawn to create instance?

teal anvil
#

Anyone else noticed all kills showing as friendly: true using ServerAdminTools?

minor agate
#

There are two ways to spawn an entity.
By placing it on the world file, or dynamically

forest arrow
#

Okay, looks like I need to review a lot of Boot camps.
Thanks a lot @minor agate

minor agate
#

dynamically you do so with SpawnEntity or SpawnEntityPrefab from Game class depending on if you created prefab for it or not

midnight talon
fringe prairie
#

Yeah something is terribly wrong with it right now

desert escarp
#

Currently I have a vehicle spawn script that works well with anything using the Vehicle class
However other mods like space core which use the Tank class, a child of the Vehicle class it causes these errors to appear

#
Reason: Attempt to modify locked entity from a different thread


Class:      'CRF_GearscriptManager'
Function: 'SpawnVehicle'
Stack trace:
scripts/Game/Systems/Core/Managers/CRF_GearscriptManager.c:2609 Function SpawnVehicle
scripts/Game/Systems/Components/VehicleSpawning/CRF_VehicleSpawner.c:70 Function EOnFixedFrame
#
void SpawnVehicle(CRF_VehicleSpawner spawner)
    {
        if (!spawner.m_sFactionKey)
        {
            Debug.Error("No Faction Key set on " + spawner.m_rVehicle + " spawner");
            return;
        }
        //Do not spawn the vehicle if the faction doesn't have the tickets
        //Handles subtracting tickets from kills that are on a timer. This means tickets are subtracted WHEN the vehicle is spawned
        if (spawner.m_bWaitingToRespawn && !spawner.m_bShouldRespawnOnSideRespawn)
        {
            if (spawner.m_RespawnManager.GetFactionTickets(spawner.m_sFactionKey) != 0 && spawner.m_RespawnManager.GetFactionTickets(spawner.m_sFactionKey) < spawner.m_iTicketsPerRespawn)
                return;
        
            if (spawner.m_RespawnManager.TicketsRemaining(spawner.m_sFactionKey))
                spawner.m_RespawnManager.SubtractTicket(spawner.m_sFactionKey, spawner.m_iTicketsPerRespawn);
        }
        EntitySpawnParams params = new EntitySpawnParams();
        params.TransformMode = ETransformMode.WORLD;
        spawner.GetTransform(params.Transform);
        IEntity vehicle = GetGame().SpawnEntityPrefab(Resource.Load(spawner.m_rVehicle), GetGame().GetWorld(), params);
        GetGame().GetCallqueue().CallLater(SetVehicle, 1000, false, vehicle, spawner);
    }
#
    void SetVehicle(IEntity vehicleEntity, CRF_VehicleSpawner spawner)
    {
        spawner.m_eVehicle = vehicleEntity;
        Vehicle vehicle = Vehicle.Cast(spawner.m_eVehicle);
        if (vehicle)
        {
            vehicle.m_iVehicleSpawnerIndex = spawner.m_iVehicleSpawnerIndex;
            vehicle.m_sFactionKey = spawner.m_sFactionKey;
            if (spawner.m_OverridedVehicleLoadout)
                vehicle.m_OverridedVehicleLoadout = spawner.m_OverridedVehicleLoadout;
            if (spawner.m_aVehicleGearscriptOverrides.Count() > 0)
                vehicle.m_aVehicleGearscriptOverrides = spawner.m_aVehicleGearscriptOverrides;
            if (spawner.m_aAdditionalVehicleItems.Count() > 0)
                vehicle.m_aAdditionalVehicleItems = spawner.m_aAdditionalVehicleItems;
        }
    }
#
IEntity vehicle = GetGame().SpawnEntityPrefab(Resource.Load(spawner.m_rVehicle), GetGame().GetWorld(), params);
#

This is the error line

#

Fixed Frame is now not on the main thread

#

That was the issue

ocean kernel
#

Looks like serializing the whole character entity to json doesnt work anymore but I didnt see it in the changelog

#

Instead it seems like there's some iteration done for loadouts over the components or whatever and then they are unserialized into an entity separately, but it's done in a way where nested storages are ignored in some cases

wet trench
#

Hi, quick question about World Systems. Can I use RplProp in a World System?

#

Or alternatively can I make a variable in a World Controller which will have the same value in everyone's controller?

reef aurora
#

whats this trying to tell me and how do i get around it

wet trench
#

I was afraid of that. I tried todo something similar with my own class. My codecs must be wrong or something

true tendon
#

I had same issue with Big chungus Combined Arms pack, but didnt realize he deleted it. That´s why it gave me that errorline

reef aurora
true tendon
#

bc it has to be some script of a mod u are using

reef aurora
wet trench
# timid citrus https://community.bistudio.com/wikidata/external-data/arma-reforger/EnfusionScri...

So I have worked this example into my project. On the server I set the playerName and the OnPlayerNameChanged runs on all machines. However, when retrieving the playerName from a client's own controller afterwards, I get the empty string ''. But at the time in OnPlayerNameChanged I receive the name okay and I can use a static variable else where to save the value. So the name never seems to remain, even though that makes the client's value different to the server's. Would you know if this is the intended behavior?

timid citrus
#

I do not know, but i imagine ark will when he's around.

wet trench
#

oh ok

ocean kernel
#

Where can I get information on changes made to arsenal loadouts?

minor agate
forest arrow
#

Hello. Still have a problem with RPL.

In my scenario I have en entity with script

class SF_RandomScenarioManagerClass: GenericEntityClass
{
}

class SF_RandomScenarioManager: GenericEntity
{
void Start()
{
ShowHint()
}

protected void ShowHint()
{
     Rpc(RpcDo_ShowHint);
}

[RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
protected void RpcDo_ShowHint()
{

SCR_HintManagerComponent.GetInstance().ShowCustomHint(
"You have joined the HVK_D15 factionssss!", "Faction Assigned", 3.0
);
}
}

Then I have a chat command

protected ScrServerCmdResult StartScenarioAction(array<string> argv, int playerId = 0)
{
//DynamicScenarioManager is the name of my spawned entity in world with type SF_RandomScenarioManager
SF_RandomScenarioManager mng = SF_RandomScenarioManager.Cast(GetGame().GetWorld().FindEntityByName("DynamicScenarioManager"));
mng.Start();

    return ScrServerCmdResult(string.Format("Scenario started"), EServerCmdResultType.OK);
}

On dedicated server players cant see hint. Why? Who can help?
@minor agate maybe you?) I did it after our yesterdays discussion

wet trench
#

oh ah I'll post mine but I'll have a look at Andrii too
So I have left in parts for a class named CLINTON_VirtualPlayerManager. This is what I'm ultimately wanting to replicate

minor agate
#

Make it Server or Both

#

There is nothing in server linking and owning the controllers

#

So they don't exist there

#

On WB Listen server, it would work as the server is also a client there

#

But on Dedicated it will break

minor agate
forest arrow
minor agate
#

Can i see the settings?

forest arrow
minor agate
#

Here it will be faster

forest arrow
#

And just for understanding.

I have spawned prefab with RplComponent and chat command.

Chat command function will be executed on client?
Prefab functions will be executed on server by default?

So getting spawned entity and calling function from chat command will work like:

  1. Client -> Server
  2. Client -> Client, as for server I need to do Rpc call with server target?
minor agate
#

You have spatial relevancy and streaming enabled

#

Meaning that the entity might not exist on some clients that are too far away of a defined networking "distance", distance is wrong term here as it is not radius based. but you can understand it quicker like this for now

#

Once the client is around the defined cells touching or inside this radius, then the entity will be streamed in to the client, and be available on it

#

non streamed entity means no entity on client

#

and when the client gets far away, it will be streamed out (It will be deleted on the client side)

forest arrow
#

understood. Disabled both options

minor agate
#

That might be what is happening on your side

#

streaming enabled gives the possibility to stream in and out.

#

spatial relevancy makes it stream in and out based on this distance (Streaming has to be enabled)

#

unticked spatial relevancy while having ticked streamable means you have to stream things in and out yourself.

forest arrow
#

But if I will untick both, it means that prefab will work as static, right? it always be replicated to client

minor agate
#

But

#

avoid doing so

#

I see you are doing a manager

#

Do a system instead of an entity

forest arrow
#

examples?

minor agate
#

See replication bootcamps 🙂

#

We go into that in detail

forest arrow
#

okay, thanks

minor agate
#

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
forest arrow
#

Okay. Expected to do it quickly, but looks like need to check important bootcamps first 🙂

minor agate
wet trench
#

I'm trying it now. It seems to make sense. I have my system location set to both. Both before and now in OnUpdate it's not finding the controller on any client. Maybe while the controller is being created I need to save my own reference to it on the system?

minor agate
#

Only FindMyController (Local version)

wet trench
#

okay I'll keep that in mind. I'm thinking I can implement my own map<RplIdentity, BotsWorldController> and use something like the controllers constructor to add itself to the map

#

and I'll use the search window to make sure I haven't used FindController yet

abstract crescent
#

does anyone know what "_S" suffix means in vanilla functions? Server side only functions or what?

wet trench
#

@minor agate In the World Controllers Example, (At the bottom of the API doc on World Systems)

class PlayerNameInputSystem : BaseSystem // 1.
{
    override static void InitInfo(WorldSystemInfo outInfo)
    {
        // 2.
        outInfo
            .SetAbstract(false)
            .SetLocation(ESystemLocation.Client)
            .AddPoint(ESystemPoint.Frame)
            .AddController(PlayerNameInputController);
    }
 
    override void OnUpdate(ESystemPoint point)
    {
        string playerName;
        bool apply = false;
 
        // Display DbgUI window which allows player to change their name.
        DbgUI.Begin("Player name input");
        DbgUI.InputText("name", playerName);
        apply = DbgUI.Button("Apply");
        DbgUI.End();
 
        if (apply)
        {
            // 4.
            auto controller = PlayerNameInputController.Cast(
                WorldController.FindMyController(this.GetWorld(), PlayerNameInputController)
            );
            controller.RequestNameChange(playerName);
        }
    }
}
#
class PlayerNameInputController : WorldController // 1.
{
    override static void InitInfo(WorldControllerInfo outInfo)
    {
        // 3.
        outInfo.SetPublic(true);
    }
 
    [RplProp(onRplName: "OnPlayerNameChanged")]
    string m_PlayerName;
 
    void RequestNameChange(string newPlayerName)
    {
        Rpc(Rpc_NameChange_S, newPlayerName);
    }
 
    [RplRpc(RplChannel.Reliable, RplRcver.Server)]
    private void Rpc_NameChange_S(string newPlayerName)
    {
        if (m_PlayerName == newPlayerName)
            return;
 
        m_PlayerName = newPlayerName;
        Replication.BumpMe();
        // We invoke callback explicitly on server. On clients, it will be invoked
        // automatically when replication changes m_PlayerName value.
        this.OnPlayerNameChanged();
    }
 
    private void OnPlayerNameChanged()
    {
        auto serverSideOwner = this.GetServerSideOwner();
        // This message will appear on server and all clients.
        PrintFormat("Player %1 name '%2'", serverSideOwner, m_PlayerName);
    }
}

Does everybody share the same player name? Or, is the purpose of the example that, one player's controller will have only their name no-matter if you refer to the Controller's Authority or Proxies?

mild quarry
pliant ingot
wooden fossil
#

Anyone know if the PIPCamera attached to the 2DPIPScope component is accessible at all? Trying to make a first person spectate mod, and to me it would make sense that the camera is private/protected to the client using the weapon anyway (why would u stream a PIP cam to every player lol). But aye, I just wanna access it and I really don't wanna do some awful override script to reduce the privacy of the var. I would make a chasecam PIP, but that won't unblock the grey'd out area of the scope if ya get me

#

It's down as a a protected attribute, so im guessing i would make a derivative class, then access it through that? just seems like a faf hahaha

#

wanted to bounce it off some peeps more experienced first

tough cave
#

for a custom mission, does anyone have persistence working where it will remember what group you were in for rejoin (within 60 seconds by default)? the character collection is missing or empty, not sure. I did some custom code in the ReconnectData in the mean time.

red cedar
red cedar
#

I have a question regarding rplprops :

Can we only sync from the server -> client side or can it go the other way around ?

The issue i'm facing is i'm trying to get the player's camera position from one client to another and when i run client side -> rplprop -> (other) client side the values don't update.

And if i fetch those informations from the server side it feels like i'm failing to get the player's current camera.

I'm trying to avoid spamming RPC calls as i heard it's not the best for perf.

Thanks in advance ^^

desert escarp
red cedar
desert escarp
pliant ingot
red cedar
desert escarp
#

Yeah 100% unreliable then

red cedar
#

Okk sounds fair enough.

Thanks a lot guys :)

desert escarp
#

You can do an Rpc to the server and use the player controllers with the owner receiver to Rpc directly to the client you want to get/send data from

pliant ingot
desert escarp
#

^^

#

Replication runs off of Fixed Frame updates

red cedar
desert escarp
#

So Frame updates just make a bunch of needless replication calls

red cedar
#

Hmm.. so fixed frame is the same thread as the one replication runs on?

When should i then use postframe rather than post fixed frame then?

pliant ingot
#

of course you can add interpolation stuff and do this in normal frames, but it's much more complex

red cedar
wanton jetty
#

is there any way to query keypresses?

fringe prairie
#

You don’t stream anything it’s just code that tells one of the cameras available to you where to go and what layout to render to

#

And the cameras don’t render new things (so it’s based on what’s around you)

formal marten
#

Apparently they're are massive restrictions on scripting now which, according to a friend is going to result in the motion trackers used by halo mods and presumably the Coalition squad interface, being banned

#

Has anyone heard anything about this or?

ocean needle
#

i havent heard anything about that but why would they?
would be a bit silly to restrict anything but illegal or offensive stuff

formal marten
#

What are the rules on scripting because according to one of the groups I'm in they have changed a lot

river imp
#

It'd be an interesting read for all of us.

formal marten
#

They said Mario ie the dev Mario but he's just corrected himself

#

Im presuming mistaken identity and someone chatting out of their backside

river imp
#

Highly likely.

minor agate
#

There is no new restrictions, nothing has changed.

minor agate
timid citrus
#

There were a few methods that were made protected is only thing I can think of.

midnight talon
formal marten
#

They said that the motion tracker used by halo mods were getting banned for an undisclosed reason after speaking to a Mario who was supposedly the community manager, after I posted my message here he redacted his statement

fringe prairie
minor agate
#

Also i am not community manager, so they probably talked to someone else

formal marten
#

Alright I'll speak with em

ocean kernel
minor agate
ocean kernel
#

You used to serialize the whole entity or something, now there's a different way and attachments on gear are ignored

#

Is it just a question of recursion depth or what

#

Would be nice if changelog included logic changes

sinful oasis
#

Hi, how do I actually identify this? I check the console.log but genuinely found no sign of a broken file, but suddenly, every single other file I ever made started randomly breaking. I was forced to roll back, luckily didn't lose too much progress but this was cumbersome and I never had this issue before. Do you have any recommendations for future mitigation or resolving?

torn bane
sinful oasis
torn bane
#

Both will show the same info

timid citrus
#

How does the bohemia dev to help modders debug program thing work? Do we just ask here or is there a way to apply or something?

#

Mario mentioned it a couple days ago.

red cedar
#

I'm a bit confused with this :

Why doesn't this work

IEntity headEntity = identityComp.GetHeadEntity();
            if(headEntity)
            {
                headEntity.SetFlags(EntityFlags.VISIBLE, false);
            }

And if we're trying to set the opacity of the head instead why do we need to put 255 to make it transparent ?? shouldn't it be an alpha of 0 to make it transparent ??

#

Nevermind... it's just my genius creating gravity once again..

so set flags isn't SetFlags(Flag, Value) but rather SetFlags(Flag, IsRecursive) so yeah... clearflags does the job..

west prism
#

Anyone here know how to do arsenals?

#

That's kinda the blocker atp

kindred vessel
#

have a look at entityCatalogs in config

west prism
kindred vessel
# west prism want to set up the arsenal and nations fo rhtem

Have a look at Entity Catalogs and this tutorial https://www.youtube.com/watch?v=98aa_y7c4Q0 that should help you

Take your Arma Reforger missions to the next level with this step-by-step tutorial on creating custom arsenals!

Subscribe for more Arma tutorials, tips, and gameplay!

Music:

Interested in joining our Aussie Arma Community? Jump into our discord server and say hi. http...

▶ Play video
west prism
kindred vessel
pallid kraken
#

hello,how to combine two moded scripts in one ?

kindred vessel
pallid kraken
#

both mods had moded same manager and code lines,but one was comment the line,another wasnt,when running in server,the script wasnt comment the lines cause errors,so I need make anonter new script override that and keep comment the lines.

kindred vessel
red cedar
kindred vessel
pallid kraken
#

salute_old let me try Im a script rookie

#

😂

kindred vessel
#

keep trying and try learning one of the C languages their very similar in syntax

red cedar
#

C# / C++ preferably(i'd say c# is closer, and easier)

graceful shoal
#

Hello!

We are working on getting all of our BLUFORs locations to show to other BLUFOR regaurdless of where they are on the map. My guys have ran into issues with this, have any of you wizards found what is probs a simple solution to this?

red cedar
graceful shoal
coarse pasture
#

Good luck

red cedar
graceful shoal
coarse pasture
#

I've tried to do something along those lines, conditionally based on admin status. It is not an easy solve.

graceful shoal
left pendant
#

I know I'm probably probably so close to finding it but I just cannot see it right now.

Where are stuff like Rotor classes stored in the script? There is currently 2 and I want to add a third type, and I'm not asking for the script done for me, I just need to know where to find the stock ones to look at how its done.

left pendant
#

yes

fringe prairie
#

All of that is handled engine side, so even if you make your own the game will likely crash

#

Or not use it

#

I can double check for you, but the game engine is handing all of the forces, how they work, etc

left pendant
#

I found VehiclePartRotor.c with:

class VehiclePartRotorClass: GenericEntityClass
{
}

class VehiclePartRotor: GenericEntity
{
}

fringe prairie
#

If it says “this is generated” you aren’t going to be able to do anything with that

#

It’s just exposing its existence to the script side

left pendant
#

I know, I'm looking for where the Rotor Entities are stored to see if I can inject a third option

fringe prairie
#

So the heli sim class accepts a main rotor and tail rotor, any other combination does not seem to work

#

But really it’s almost an easier time if you want to pursue this to inject it your self with parallel component since it’s just slot manager, animations, mesh swapping, and destruction handling

#

“Just” is being a bit conservative

#

It would be cool to have two main rotors like on my chinook but steering (yaw) is exclusively tied to the tail rotor, so in a way it might be better as a feedback request item, but I like hacks like this

left pendant
#

I'm trying to work out to get Z axis rotor thrust for a skid steering component

fringe prairie
#

Nothing is ever impossible, but some things like this will be very hard. An example is that where the rotors are handled more than likely is within the "Helicopter" class, which is not exposed on script side, we have the HelicopterSimulation component, which is generated thus only a few things are visible on it (like get what type of landing gear, but you want to something with it? No!)
SCR_HelicopterControllerComponent/VehicleControllerComponent is moddable though, even if other related components might not be.

#

What are you trying to do with the skids exactly, or the outcome? There is probably a way to force what you need

red cedar
#

I'm so happy to know devs are just like us frfr

left pendant
fringe prairie
#

You could measure the existing forces on the model with physics api, but moving the skids would be difficult I think because they are game code and like wheels, can’t be moved once instantiated.

left pendant
#

no, sorry I used the first term that popped in my head because I couldnt remember the flight term for, turning via Left-Right engine throttle, Like skid steering/track steering.

fringe prairie
left pendant
#

no, but I guess it could be, never thought about that

wooden fossil
#

how do i draw debug lines

#

just one singular red oat is all i require brother

#

i need it

desert escarp
wooden fossil
#

piss

#

thank u tho aaa

desert escarp
wooden fossil
#

could i do it as a GM ui coimponent tho aye

#

or u not k n o w

#

im dogshit at UI

red cedar
#

aren't we all ?

delicate anchor
#

How would one run a script at game start, without it being a gamemode? I want the script to be loaded on every scenario, so creating an entity and adding it to a map is a no go

#

I tried making a GenericEntity script and calling EOnInit, but as far as I figured out, you'd have to actually add that script to the game world?

ocean needle
#

just need to add it your system to a system config and put that in your mission header

#

or overwrite one if you can't change the header

delicate anchor
#

Would that load on every scenario possible?

#

What I'm really trying to do is listen for events from the editor/gamemaster, which I've figured out, but to subscribe to those, I'd have to ofcourse have a singleton script that runs at game start

ocean needle
#

no idea what the best practices are but you could then instantiate a helper class and keep a ref in your system and just do what you need

delicate anchor
vast flower
#

is there any way to manipulate vehicle bones via script code (or just open or remove this this door)?

delicate anchor
scarlet iris
dire sinew
#

Easiest is to mod ArmaReforgerScripted and override OnGameStart.

#

No need to tamper with prefabs

delicate anchor
#

Roger, will take a look at your suggestion. Thank you.

shrewd nova
#

PLATFORM (E): Save data file 'WorldState/000001e1-bc00-8025-8000-0053005bc006.json' is too large. Maximum allowed size is 16MB.
@torn bane
Sooo is there any way to switch this up so we can have multiple files and have each be a different category of saving??

midnight talon
tough cave
#

do the BI devs know they left the tmp.c (debug) script for that Poison thing in game? running OnUpdate every time

torn bane
tough cave
#

Scripts/game/tmp.c

#

ill screenshot in a bit

midnight talon
#

experimental? my 1.6 prod WB only has game.c in that dir

torn bane
#

One of your mods you have loaded adds itt. Base game does not have this file

tough cave
#

my bad, i saw other ppl complaining about it, so I assumed. It looks like it's in ace core, so that mod may have been left in a weird state. and no namespacing. sorry for wasting your time, I stayed up all night, and was obsessed with the idea that something is going on with debug mode and mission stuff, that is creating performance issues or something

torn bane
#

The idea is correct, just the wrong place. Please tell the mod author 🙂

tough cave
#

EDIT: nvm, I deactivated the AI early on. Reactivated when players join for first time. This is on top of other fixes that probably optimized things. I don't know if there is a burst of activated AI at that time though, and if it can be reset another way so it goes back to distance-based (network bubble) deactivation again.

anyone know if the game is semi-paused or in a special state (past pregame though if looking at scripting though) when dedicated server first starts? it seems there is a ton of CPU usage until a player joins, then normal usage, and it quiets down when they leave. and maybe it should pause while waiting after pregame manually in (custom) game mode. not sure. AI and everything spawns in during pregame as normal, but it seems to finish quickly enough.

sleek moat
#

I'm assuming there's no way to mod a script and stop the old og one compiling?

ocean needle
#

how do i get/listen for an event from an ActionsManagerComponent the base get actions method returns 0 actions and the get actions method within a context (default context) also returns 0?

is there another way to get the action that im missing?

ebon escarp
#

Hello, I'm getting oriented on the new Enfusion APIs. It seems like the documentation is broken for the SCR_RespawnHandlercomponent, which no longer exists? Also, the main Youtube tutorial which discusses this also seems to be outdated, and I can't find anything updated in the BIKI.

timid citrus
wooden cape
#

Been seeing this spam client error.logs since the 1.6 update:

SocialComponent::IsRestricted: Invalid otherPlayerID
#

Seems to come in batches upon player connect

thorny spoke
#

Coming from Arma 3, anyone got any examples of a client calling a server side function that then persists something?

Do server side functions exist? How to I have code that can only be executed server side?

ebon escarp
#

Just like in Arma 3 you'd do stuff like "isServer" and "isDedicated"

ocean kernel
#

Are there any cool script things in 1.6?

#

As in scripting features

ebon escarp
#

(Just in case this helps someone searching in the future).
Here is a demonstration of how to get hint messages to display for Reforger, like in Arma 3! (SCR_HintManagerComponent)

bool wasShown = SCR_HintManagerComponent.GetInstance()
  .Show(SCR_HintUIInfo.CreateInfo(
    "hello world", 
    "myHintName",
    60.0, // 60 seconds, to make sure you see it
    EHint.CONFLICT_VETERANCY, 
    EFieldManualEntryId.CONFLICT_RECON, 
    true
  ), false, true); // <-- this final "true" forces it to display no matter what!

PrintFormat("sending hint! wasShown=%1", wasShown);
ebon escarp
#

Tutorial! How to bind your own custom code to an in-game event in Reforger: in this case, we'll show a hint message when you turn on a helicopter's engine.
You can do this for any event: just look for the ScriptInvoker* fields in any class, and then you can do this same pattern to write your own custom stuff whenever those events happen in-game.

scarlet dune
#

wow thats cool

midnight talon
gentle cradle
#

how do i disable the group loadout thing

midnight talon
gentle cradle
ripe leaf
#

Hi! Getting my first looks at enforce script at the moment.
Am I missing something? Is there no try/catch? I also can't find any Exception or Error classes in the docs.

I'm primarily looking here, which is the only syntax reference to my knowledge:
https://community.bistudio.com/wiki/DayZ:Enforce_Script_Syntax

midnight talon
ripe leaf
#

ah I see. But what happens if I actually do something stupid? like a zero divisor or an out-of-bounds array read?

midnight talon
#

It will throw a VME which in WB you can debug or in prod client I think the method throwing it just aborts/returns early

ripe leaf
#

ahh okay. Thanks for your help!

wanton jetty
#

does anyone know how to query keypresses/mouse presses?

ebon escarp
ocean kernel
#

"ECS"

#

Big Systems wants you to believe systems are the best thing in the world

ocean kernel
#

redundant variables m_iSavePointNr and m_iPlaythroughNr, broken variable m_iStartedUnix in meta files for session saves

solemn furnace
#

Hello everyone. Guys, I need some advice - I'm trying to figure out how to connect Arma RF to an SQL or MongoDB database through EDF. My question is: does this framework already allow this, or is it still under development? Or is this implemented in some specific way? Here's the error that WorkBench is giving me. Thanks for your help.

#

Or do I need to use the extDB library instead?

torn bane
torn bane
ocean kernel
#

They're redundant because this information is already in the folder and file names, the started variable is always 0

torn bane
#

The folder names are only for you to read nicely, the meta info file is what matters. On consoles the structure is entirely different. Started should not be 0, i'll have a look

thorny spoke
#

any way for me to add interaction to items? e.g add an option to a door, or add a trigger to a computer? Similar to how you interact with doors/lights

timid citrus
torn bane
coarse bane
torn bane
coarse bane
#

;/

#

ye but for now external databases is not supported

#

right?

torn bane
#

But any time invested into EPF is wasted, it is deprecated

#

There is plenty to work on before you even need a real database. until then it might already be in the game.

midnight talon
coarse bane
#

why would i want to use file storage instead of db unstructed data is slow

ocean kernel
#

better usage of database is to have communication between multiple servers

#

speed is rarely a factor nowadays when everything runs on NVMe

midnight talon
#

even then you could probably split up your json bundles you want shared (usually just player characters and stats) and use rsync or something to sync files for that global stuff across your servers

solid hearth
#

proper db > fs

torn bane
fringe prairie
#

Any reason why certain shaders are kaleidoscope on Xbox? Like the thermal imaging post process effect?

thorny spoke
#

Any guidance available on extending EveronLife framework? I think my scripts are not loading because they are not attached to the prefab (GameMode_Roleplay.et) maybe I am very wrong

I have managed to override a UI component successfully, my script is located in the /scripts folder

For context, I my own mod that's got it as a dependency

I can't find a link to the Everon discord that's talked about on github

minor agate
thorny spoke
#

but I can't @ staff members 😂

torn bane
ocean kernel
#

this is incorrect as setting it to 0 makes it save every frame

timid citrus
ebon escarp
#

How do we override a config file? I was taught to go to "Create > Config File > Select Class", in the main Workbench window, but I don't see ChimeraSystemConfig as an available option. Also, the Solution Explorer claims not to recognize that file name.. so, clearly I'm looking in the wrong place.

ebon escarp
# gloomy lynx right click it > override

Thank you! The answer that nobody clarified directly is that we must search for the file in the usual Resource Browser panel, and then right click on it there.

ebon escarp
# gloomy lynx right click it > override

Follow-up: even after reimporting and restart the workbench, the new script I made which inherits from WorldSystem isn't recognized from the list. Clearly there is a pitfall that either I'm overlooking, or there is something that everyone in the search history is glossing over.

gloomy lynx
ebon escarp
gloomy lynx
#

what exactly are you trying to do?

ebon escarp
pliant ingot
ebon escarp
#

\ArmaReforgerWorkbench\Project00\unnamed_Layers\MySystem.c

pliant ingot
#

all scripts must be in scripts/%ModuleName% folder

gloomy lynx
#

needs to be in project00/scripts/game

pliant ingot
#

modules you can find in project settings, but 99% - game

ebon escarp
#

Thank you - this is a reasonable pitfall that anybody can fall into. Thank you for the guidance

gloomy lynx
#

worlds and layers need to be in %myproject%/Worlds/%worldname%/world.et and %myproject%/Worlds/%worldname%/world_layers

ebon escarp
#

Is this kind of knowledge documented anywhere that I should have seen already? It seems very tribal

ebon escarp
# gloomy lynx https://community.bistudio.com/wiki/Arma_Reforger:Directory_Structure

It says that the structure is for their own internal designs: the fact that their ECS system is looking specifically for a magic folder path should be made clear somewhere. Otherwise, why give us the freedom to create our own folder structures?

There's no point in me complaining though: I won't be the last person to get confused by this

#

Thank you @gloomy lynx and @pliant ingot for the help!

gloomy lynx
gloomy lynx
#

any scripts outside of scripts/game will not be recognized

#

as for configs it depends

#

prefabs and assets like .et and .xobs can pretty much be anywhere

#

but practicing good structure saves time and confusion for you in the future

#

for best practice, model your directories exactly how base game does

thorny spoke
#

I'm trying to perform an action when a user presses f5

    if (inputMgr && inputMgr.GetActionTriggered("VehicleSpawn"))
    {
        Print("[Vehicles] VehicleSpawn action triggered!");
        Rpc(RpcDo_SpawnVehicleOnServer);
    }

Any idea what I might be missing here 😓

torn bane
red cedar
# thorny spoke I'm trying to perform an action when a user presses f5 ``` InputManager inpu...
  1. override the file chimeraInputCommon.conf

  2. restart your workench LMAO

  3. Add your keybind config like you just did in that file

  4. Add a context to your keybind(a context define when a keybind is active or inactive, this way you don't start shooting your rifle or crouching while flying a helicopter)
    (My guess would be you'll need to use CharacterMovementContext)

  5. for the code part it's best if you use the addactionlistener



        m_inputMgr.AddActionListener(MY_ACTION_NAME, EActionTrigger.DOWN, myActionTriggered);

void myActionTriggered()
{
Print("[Vehicles] VehicleSpawn action triggered!");
}
ocean kernel
torn bane
ocean kernel
#

Ah sweet. Which wiki page is this on?

#

Seems a bit out of place to have a persistence related setting outside of persistence

torn bane
ocean kernel
#

oki doki, will the auto save interval set to 0 be working as disable after upcoming update?

torn bane
#

In a future update yes. First I have to fix it next week internally 🙂

solid hearth
#

Is there any way to disable the windage affect via config or script? Or is the only way to just edit base prefabs and mark it down as 0 thenking

thorny spoke
red cedar
#

Use ChimeraInput.conf

thorny spoke
#

It gives me the option for custom configs at the bottom, take it that's incorrect

red cedar
#

Under your desired context you add the name of your action in the list "action refs"

thorny spoke
#

got that, so where do i define what key maps to this?

red cedar
#

I'm not sure what's the name of the section for it, but basically the same way you did in your vehiclespawn.conf.

thorny spoke
#

Thank you so much!! I am coming from A3 so it's taking me a hot minute to get used to all this

red cedar
#

And a huge thank you to all A3 modders for making the game awesome and making me want to mod games myself.

trim aurora
#

Hey this is a snippet of a world editor plugin I have been using for some time now, to snap objects together. But since the 1.6 update the copying of the RELATIVE_Y flag is bugged. For some reason the RELATIVE_Y always gets activated. Did something change with flags or did I have something wrong from the beginning?
I am kinda confused whats going wrong here, because even other plugins from BI use this approach (E.g. SCR_EntityFlagsManagerPlugin.c, Line 279).

vector angles, lastPos;
lastSelectedSource.Get("coords", lastPos);
lastSelectedSource.Get("angles", angles);
        
string placementMode;
EntityFlags lastFlags, newFlags;
for (int i, count = (entityCount - 1); i < count; i++)
{
    IEntitySource entitySource = worldEditorAPI.GetSelectedEntity(i);
    
    //Rotation
    worldEditorAPI.SetVariableValue(entitySource, {}, "angles", angles.ToString(false));

    //Placement
    lastSelectedSource.Get("placement", placementMode);
    worldEditorAPI.SetVariableValue(entitySource, {}, "placement", placementMode);
    
    //Flags - Relative_Y
    lastSelectedSource.Get("Flags", lastFlags);
    entitySource.Get("Flags", newFlags);
    
    if(lastFlags & EntityFlags.RELATIVE_Y) {
        newFlags |= EntityFlags.RELATIVE_Y;
    } else {
        newFlags &= ~EntityFlags.RELATIVE_Y;
    }
    
    //Flags
    worldEditorAPI.SetVariableValue(entitySource, {}, "Flags", (newFlags).ToString());
    
    //Position
    worldEditorAPI.SetVariableValue(entitySource, {}, "coords", lastPos.ToString(false));
}
ebon escarp
#

@trim aurora FYI I think your for loop might have an off-by-1 error: I don't think you need to do entityCount - 1 in the declaration.

#

If you do i <= count then that can also fix it

trim aurora
trim aurora
#

Just tried it with SetFlags and ClearFlags over the IEntity and they also have no effect.
The if case still works, but the setting of the relative_Y value just seams broken.

ocean needle
#

why do prefabs i spawn via script do this sometimes?
i cant fix it or get it to happen reliably notlikemeow
manually calling entity.Update() fixes it*

trim aurora
# trim aurora Hey this is a snippet of a world editor plugin I have been using for some time n...

OK I think I am going crazy. I now do everything the same as the SCR_EntityFlagsManagerPlugin does it, but the flags don't get set for some reason. The workbench does pick up that something happend to the flags, because if you reset all flags then run the script the Traceable, Visible and Static Flags show up as modified (Bold)(They did not actually change their state).
So something might just reset them directly afterwards or Arma is being Arma.

tough cave
#

is anyone getting their mods (scripts) fed into AI LLMs by others? talk about being done dirty. and the distilled code is not pretty, so nothing is being gained, not much learning going on either probably.

dire sinew
dire sinew
# ocean needle snap & orient to terrain

Yes, if you just set transform after spawning, you gonna have to update colliders by broadcasting Update. Only exception is if you use SetTransform on the editable entity component if your entity is editable. Why not snap and orient the transform beforehand and pass it to spawn params?

ocean needle
tough cave
#

Is map (keyval) being unordered somewhat new in 1.6? I saw a logging framework / mod using it, which seems odd.

solid hearth
ocean kernel
trim aurora
ebon escarp
#

About the ECS system: it seems that every time I touch a System's file, the entire World Editor needs to unload and reload from scratch. This is very annoying and slows me down. How can I disable this, so that it only does it when I want to actually test/run the scenario?

wanton jetty
#

anyone know how to query key presses?

action manager works, but its a very cheesy way to do it.

tough cave
minor agate
minor agate
tough cave
restive island
#

wrong channel 😄

rustic hinge
#

Hello, I need help? on a DeathInfoDisplay
I'm not a pro developer, so I'm using AI. I know it's not the best way, but I'm doing what I can.
The AI ​​told me that in version 1.6, it's no longer possible to retrieve player identities on the client side, so I'll have to work around it with a mod on the RPC server side.

Issue Summary

Our custom death-info overlay (DeathInfoDisplay.c) no longer receives valid instigator data in Arma Reforger 1.6. Whenever a player dies—whether on Workbench Tools or a dedicated dev server—the instigator APIs fail to return the killer entity/player ID, so the UI can’t display the killer name or distance. We end up showing “Enemy (0 m)” as a fallback.

Environment

Arma Reforger 1.6 (Workbench Tools + dedicated dev server)
Occurs both in single-player AI testing and multiplayer dev sessions.
Reproduction Steps

Load the mod and spawn as a player.
Allow an AI (or any opponent) to kill you.
Observe the death overlay and debug logs.
Observed Behavior

Instigator.GetInstigatorEntity() returns NULL.
Instigator.GetInstigatorPlayerID() returns 0.
SCR_InstigatorContextData.GetKillerEntity() and .GetKillerPlayerID() also return NULL / 0 (they rely on the same data).
We log instigator.GetInstigatorType() and it reports AI, but no entity/ID is provided.
UI falls back to “Enemy (0 m)” and can’t show a real name/distance.

Thank you for the replies.

scarlet iris
rustic hinge
silent shard
# rustic hinge Okay, but that doesn't really help me.

Don't use AI. It won't be of any help to you, and it will prevent you from learning scripting and how the API works. If you lack an understanding of programming, or how scripting in the context of game dev/ game modding works, then now is the time to start learning. It won't take you very long to understand the basics.

Are you just trying to display the name of the enemy that killed the player?

rustic hinge
vernal hawk
#

Why is this happening?

midnight talon
#

or start posting nonsense articles about Enforce Script on Reddit to poison the learning data 😄

wanton jetty
#

anyone know if a websocket is possible? i dont want to mini-ddos my api with get/post

midnight talon
wanton jetty
#

thought so

midnight talon
#

I haven't really used it myself yet but I remember seeing it supports HTTP2 so it might be able to handle server-streaming requests

#

also chances are your HTTP server can handle wayyyy more concurrent requests than Reforger Servers can put out - even if your server is running 60fps and sending 100 requests per frame that's only 6kreq/sec, most async io HTTP libs/frameworks can comfortably handle 100k+ if not millions of req/sec per node on mid hardware

red cedar
midnight talon
red cedar
#

Lmao

red cedar
#

Or when a vanilla game system isn't set up properly, so the ai redo it in a very unoptimized way

midnight talon
#

Print("🚀 The system has started!");

wanton jetty
red cedar
ocean kernel
#

It is one of the most wasteful game servers in terms of bandwidth

midnight talon
#

Reforger RPL spam way more packets than your scripts ever will

ocean kernel
#

200 players + 2 helicopters = 1 Gbps network card maxed

midnight talon
ocean kernel
#

So it has a lot of limitations most people won't like

#

But for scientific purposes it is fine

midnight talon
#

interesting to know it's capable of it even if it chewed resources

ocean kernel
#

good old 128 player conflict servers still use at least 80 TiB of bandwidth per month if they are full 24/7

wanton jetty
shrewd nova
#

Never hosted conflict or anything just thought ide share that info

#

Never went over 2mbit per player

red cedar
shrewd nova
#

We hit epf limitations at about 95 players, saves wouldn’t be able to end before the next one began

shrewd nova
#

I would just check the analytics in task manager with about 90 people and we never went above 150mbit up

red cedar
#

I could be mistaken but i believe that it really starts to use more and more bandwidth when you're filling up the last ~40 ish slots of your server

shrewd nova
#

During saves we would get spikes on download up to 100mbit but that was the ceiling for roughly 90 players

#

Granted there’s a lot less going on on the map than a conflict server

red cedar
#

I wouldn't know honestly, i'd like to see some proper official numbers on that

shrewd nova
#

Survival servers probably use the most with the addition of thousands of loot spawns

midnight talon
solid hearth
desert escarp
#

We had 100 players grouped together in the same 100m and got an insane amount of disconnecting with Replication Stalling, moving them away allowed for some more players to connect but it was un playable

solid hearth
#

Yeah, I would expect nothing less. Player count isn't the issue, density for cell replication is 🙃

desert escarp
#

A lot of our methods are not great for replication tbh, we're optimizing our codebase a bunch for replication but I truly dont know how we stop it haha

open pier
#

Having 40 people in spawn doing random things all the time really stressed the network. We were normally over 200MB/s

desert escarp
#

Honestly sucks, would love to see 128 players working in the same couple km without absolutely destroying the servers performance by playing the game itself

open pier
#

Managed to get our mass DCs lowered after a bit. Would love to be able to get 128 people in a diag server to truly see whats happening

coarse bane
#

I don't know much about networking, but how big of a difference would it make if crossplay didn't exist?

solid hearth
#

Consolephobia eh? It should make zero difference, well minus that specific player but whether they be console or pc the data going back and fourth should all be the same. There isn't anything particularly complex about it, also consoles now a days are x86-64, they're pcs on a special OS.

coarse bane
#

Not really Consolephobia, but when I think about consoles, I think about creating games on a different “engine,” and I assumed there was a synchronization problem.

scarlet iris
coarse bane
solid hearth
#

PepeLaugh maybe in the stone ages but like I said they're basically mini pcs running on amd cpu/gpu. Only thing wrong about them is controllers peepoTongue

coarse bane
#

In the long term, it's cool that there's crossplay

scarlet iris
solid hearth
#

Crossplay is neat but keep it out of most fps games. Arma is fine cause its fairly casual but other games that want to give 5 different handicaps to the controller should not have crossplay. Anyways not the channel to talk about this peepoWaving

formal marten
#

Has anyone actually tested how much scripting you can run in Arma Reforger before it decides to start screaming for death?

static roost
#

Hey guys, I am slowly learning like I used to in arma 3 for fun on the side, currently working into making "super soldier" mod, where I am making fun units like Juggernaut or the only other one I have so far (unnamed) but high jump and no fall damage. Super fun to mess around and make these units, but am super stuck on how to manipulate health pool for the juggernaut, I want him to have 5 times the normal health, but cannot for the life of me figure it out, any pointing in the right direction please? (also resources pointing to would be great, I try messing around on the bohemia website but never find what I need easily). Much appreciated it anyone responds!

static roost
#

ok figured that one out, have to change the max health in every hit zone lol

#

how about movement speed, since it doesn'et let you add movementcomponent which has the movement values, to the player.et's you can duplicate, that's my next question 😛

midnight talon
#

How tf is it possible for scripts to compile fine in WB and on DS init, but DS still crashes with compile error?

pliant ingot
#

We need full script to understand it

midnight talon
#

It's just a basic WorldSystem, the variable it can't find is initialized in the class with a default value, so very bizarre it's somehow not defined when I call it on DS from another system that executes after it like DL_LootSystem.GetInstance().lootDataReady

#

https://pastebin.com/FpuS47hU is the full system script, I'm referencing it in another system that has .AddExecuteAfter(DL_LootSystem, WorldSystemPoint.Frame) set so it should (and does in WB) seem to correctly depend on the other system. Everything compiles and runs perfectly fine in WB but DS just explodes when trying to compile the script 😖

    override void OnUpdate(ESystemPoint point)
    {
        if (!Replication.IsServer()) // only calculate updates on server, changes are broadcast to clients
            return;
        
        if (started)
            return;
        
        started = true;
        
        if (!DL_LootSystem.GetInstance().lootDataReady)
            DL_LootSystem.GetInstance().Event_LootCatalogsReady.Insert(ReadLootCatalogs);
        else
            GetGame().GetCallqueue().Call(ReadLootCatalogs, DL_LootSystem.GetInstance().lootData);
    }
#

could the fact I get this script authorization popup when running in WB be related?

pliant ingot
sleek moat
#

Did I see somewhere for 1.6 something changed in how you can get a players controller or role, something like that? I'm sure i did but can't find it

pliant ingot
midnight talon
midnight talon
pliant ingot
#

Your WB and DS versions for mod are matched?

midnight talon
#

Holy fuck I forgot to publish new DL version with it added so obvious now haha FacePalm

#

Thanks Vlad!

#

Only just started splitting my stuff up into separate mods so didn't even cross my mind haha

languid steeple
#

hey , i use a mod for my Music radio , but the mod got a script error , i don't even know what i have to do to correct it !

can someone save me !

the error :

#

@graceful falcon

languid steeple
#

Thx sirrrr!

midnight talon
#

anyone else get this in game modes that spawn players unarmed in latest update? not sure if game bug or just something I broke

torn bane
midnight talon
languid steeple
#

cuz it doesn't work i have a message error about the mangementmodule !

ocean kernel
#

Did the update fix persistence crash when number of saves is >999?

Nope it is not fixed, yay

mossy spade
lost pecan
#

Did someone figure out how to "attach" the three new commander menus to a vehicle, like the command truck?

midnight talon
mossy spade
#

Workaround for the UI problem until it gets fixed in 2027:

modded class SCR_WeaponInfo
{
    override protected void DisplayOnResumed()
    {
        super.DisplayOnResumed();
        
        Show(m_WeaponState && m_WeaponState.m_Weapon, UIConstants.FADE_RATE_SLOW); // Pausing hides this display thus we should show it again when it is resumed
    }
}
fervent cedar
frosty sable
tough cave
#

we still getting spammed for compiling scripts? thanks for the hotfix, but u taking seconds and minutes off everyone's life for something that should have never made it through 2 updates. it's probably a line of code for the assertion to be checked at all, and there's nothing we can do about it anyways.

forest arrow
#

Does anyone has a problem with SCR_TerrainHelper.SnapToTerrain()? For some reason, it doesnt work

vector transform[4];
transform[3] = position; // your vector
SCR_TerrainHelper.SnapToTerrain(transform);
position = transform[3];

    // Assign the position to those parameters

params.Transform[3] = position;

true crag
#

Hey, I'm having an issue with the Scenario Framework trigger in Arma Reforger. The idea is that units should spawn when the player enters the trigger zone, which works fine. However, when I enter the zone with a helicopter or vehicle, nothing spawns as expected, but when I leave the trigger zone in the vehicle, the units spawn unexpectedly. I've tried using the "Once" option on the trigger condition, increasing the update rate, and adding altitude-based conditions to exclude flying vehicles, but the problem persists. It seems the trigger activates on exit events or condition changes, causing unwanted spawns when leaving the area, despite the conditions meant to prevent this. How can this behavior be fixed or worked around?

#

Does somebody has the same problems?

modest flame
#

I made some changes to my mod and now I want to update the prefabs I use in other projects with these changes. Is there a way to automatically apply the updates so that the prefabs in the other projects are also updated? Or do I have to create a new prefab every time I make a change?

lament oxide
#

From a script perspective, is there a way to detect when a weapon is being displayed in the UI?

I tried creating a script component that ran on post init, thinking that if I always initialize the pivot ID changes early, it would show in all cases. but that didn't change the weapons in the gear menu or UI.

Long story short: I'm using scripting to dynamically move attachments pivots based on the weapon it self. It looks fine in First/Third person, but things aren't in the right place in the UI. Thoughts?

solid hearth
#

UI is a separate world if i'm not mistaken. Or well character preview

lament oxide
#

So then shouldn't a pre-init work? Or maybe I'm using the wrong type of initialization?

molten glacier
#

How do you spawn an ammo prefab like a rocket in a fired state while having it aimed at a waypoint?

thick tinsel
#

Absolute noob when it comes to scripting, however I feel I need to start. Where is a good place to start?

pliant ingot
#

Modding bootcamp videos on YT

thick tinsel
forest arrow
#

I have two points, vector and vector. How for second point (prefab spawn) set rotation in oposite direction from first point. Tried a lot, didnt work fine

tulip magnet
forest arrow
#

I think second one. Maybe some helper exists for it, from arma

ocean needle
timid citrus
stuck valve
# torn bane No it is not

I tried using these simple startup settings with a vanilla map. The map saves cyclically, and with the parameter, I actually return to the server with everything I had. The problem, however, is with maps like Anizay, which apparently don't have a saveload feature, so saving doesn't start automatically.

ArmaReforgerServer.exe ^
-config "C:\Reforger\config.json" ^
-profile "C:\Reforger\profiles\server" ^
-loadSessionSave

I also noticed that unlike before, some modded equipment doesn't load correctly and it removes them. However, the inserted items and systems remain saved and reloaded.

red cedar
scarlet iris
true crag
#

Thanks guys didnt know

tulip magnet
#

any way to reference collision layer / preset layer masks? I know its possible but I can't find the exact class mentioned anywhere (possibly just overengineering this since its just for a raycast /Tracer, just want an easy way to pick what layer)

#

hmm I don't think so 🤔 from what I can gather from the comments "GetInteractionLayer" just gets your current layer

tulip magnet
#

I know for the bitmasks you can just calculate them manually like in #reforger_servers message but if I can do it in a better way I want to do it like that 😅

minor agate
tulip magnet
#

thank you!

minor agate
ebon escarp
#

Is anyone here actually making specific, one-off missions for their own private groups? I feel like this channel is a combination of people working on big server networks or people just exploring and trying out stuff. I see lots of groups advertising themselves in #communities_arma_reforger but they all seem to be Zeus/GM-based, without any actual mission makers. I figure I'll level up faster by joining a group that has custom missions, so that I can learn from (and compete with) the people in that group who are doing the same thing. I got a lot of value, personally, from that kind of thing in Arma 3.

dire sinew
#

Also I think the vanilla combat ops scenarios are completely built with the framework too.

scarlet iris
opal loom
#

Anyone could help regarding inventory catalog. For me it gets merged and i have dupe items, is ther way to make engine avoid dupes ?

ocean kernel
#

What is this kick reason?

coarse bane
#

group 1 reason 12

ocean kernel
#

Exactly, the reasons only go up to 10 in GetFullKickReason and therefore it should be <unknown> and not ""

#

So, where does the "" come from?

coarse bane
#

maybe is null

#

idk i dont script

#

maybe check battleye docs

ocean needle
coarse bane
#

this one refers to stalled rpl reason 3

midnight talon
#

No that's a placeholder for the reason

coarse bane
ocean kernel
#

So where does the string for kick reason get zeroed?

wanton jetty
#

anyone know if its possible to parse all the resourcenames that are currently loaded with mods?

ebon escarp
ocean needle
#

maybe it came from cpp?

pliant ingot
#

somehow they broke stringification of kick cause code

#

but 12 is server full, sometimes it happens even after join queue xD

delicate anchor
#

Alright dumb question: When placing breakpoints, what does a hollow circle with an exclamation mark mean?

minor agate
#

(You have not recompiled after changing a line/lines)

#

Or not accessible line for debugger

delicate anchor
#

Great, thank you!

dire sinew
#

Just found a very neat method for enabling colliders of gadgets in hand: InventoryItemComponent::SetTraceable. Could be useful for riot shields and what not.

midnight talon
scarlet iris
#

What's the best method for deleting particle effects?

lilac sundial
#

I'm considering learning scripting for Enfusion, I have VERY basic knowledge of this stuff - Any guides/starting points? 🙂

ocean kernel
#

Grab collision velocity and apply damage to hitzone

midnight talon
ocean kernel
#

Seems doable

#

I miss Trespasser

#

It was the first and greatest hand type game

timid citrus
#

I'm hoping to do active ragdoll physics at some point

ivory orchid
#

anyone use super grok for scripting?

midnight talon
#

LLMs don't understand Enforce Script, you'll have to train your own model if you really want it

torn bane
red cedar
scarlet iris
red cedar
#

I just think it's a shame

#

Ai in programming was kinda made just to be fast and profitable, if we start using it extensively in non profit project then i think it really is a shame

carmine fog
#

Hi all. I know some others have had issues with this and I've sent out a few messages for any assistance. Has anyone found a fix for spamming of:

SCRIPT (W): [AnimateWidget.PrepareAnimation] AnimateWidget entity instance is missing ImageWidget<0x000002B57FDFE0B0> { Name: 'Saline_icon' }.Saline_icon SCRIPT (W): [AnimateWidget.PrepareAnimation] AnimateWidget entity instance is missing ImageWidget<0x000002B57FDFE2B8> { Name: 'Morphine_icon' }.Morphine_icon

This triggers on opening storage and then spams continuously, even after closing container. It appears its looking for an animation for the Saline bag and Morphine injector. Any ideas on the best way to solve are much appreciated. Thanks

#

posted here also to see if any of you scripters can help - this inifinitely spams

cobalt light
#

in BaseTransiver.c there is an external in for changing the frequency resolution, is there any way to edit this?

#

As atm it seems to be set to 0.5MHz but should ideally be 0.2 after the changes to the radio system

ivory orchid
# red cedar If you want to use AI to mod then i think you should simply stop modding. I don...

on the contrary, i can build things in blender, i can paint them, i can bring them into the tools and make them work i can even design everything else, but not everyone can do everything and ideally if people would be willing to help each other more than id of found someone to help write scripts, but everyone wants an arm and a legg that a small community cannot afford so i think its kinda counterproductive to give up, if i cant find someone than grok4 and soon grok 5 coming out does write code, which when you work 50-60 hours a week and dabble with the rest you only have so much time in a day,

red cedar
ivory orchid
#

every single scripter ive met has asked for money and i refuse to pay for it

red cedar
#

I forgot that different people have different set of skills. I can't do anything in blender personally^^

red cedar
ivory orchid
#

no i just havent found the right people yet. and maybe i want too much im trying to make a RP server based off the originals like sahrini and chernarus. but in a different setting with some modern touchs . so there is alot too it. AI seems to write the code and debug it but trying to peice it all together its very finicky. like intergrating it can be a pain. why i was asking if anyone had experience using Grok

red cedar
#

Well also if you approach people and ask them to write scripts for you, you'll usually be told no

#

It's not about "finding the right people" just that no one will be willing to spend time working on someone else's project for free, i get a few of those dms a week and I'm probably one of the world's most okayest script boy in here.

ivory orchid
#

they have to share the passion i put the adds out for the project and these are the people i get. just because people dm you weird stuff doesnt mean everyones out there doing it yknow.

midnight talon
# ivory orchid they have to share the passion i put the adds out for the project and these are ...

That's the thing is most scripters are already tied up in projects they are passionate about. So generally speaking if you want something scripted you're gonna have to learn how to do it yourself.
There's tons of resources to learn and modders will happily help you figure stuff out if you get blocked on something, but nobody is gonna do things for you unless you get extremely lucky and find a scripter who is both available and more interested in your project than any of their own ideas

river imp
river imp
scarlet iris
river imp
scarlet iris
#

What I mean is, at the end of the day mods are for the enjoyment of the normal users, and I'm sure they don't really care how the mod they are playing was made as long as it works and it's a good mod

midnight talon
river imp
#

There's 0 reason someone should be able to win money in a contest if they didn't actually do the work.

#

Regardless, game development as a medium is art, just like film making.

#

And what we had was an art contest.

fringe prairie
#

Yet we don't use fortran to make mods

#

Or punch cards, etc.

river imp
#

Just a shame that we can use AI to create art for a money winning competition.

fringe prairie
#

Besides the point

scarlet iris
# river imp There's 0 reason someone should be able to win money in a contest if they didn't...

Let's go to the extremes and assume the person puts in zero effort, types a prompt, pastes the output into the game, it miraculously compiles without issue, and the result is a mod so strong that it beats every other entry in a competition. Does it deserve to win? That depends on what the competition is actually measuring. Who deserves the prize money? The person or the LLM that produced the work? That is a gray area for sure. It does feel unfair, we can agree on that.

#

All I am saying is that whether we like it or not AI scripting is here to stay and it will only get better over time meaning more and more people will do it. And there is no way anyone can prevent that. Maybe now you can look at a script and suspect it was AI generated, but in a couple of years it will have gotten so good at it that and you won't distinguish a human made script from an AI made one. and the devs insist people can't train models on their code but realistically there is absolutely no way to prevent that

river imp
#

We're entirely too off topic atm. My final thoughts on the subject though. Its a slap in the face to modders that have spent years learning scripting for someone to swoop in and win a contest by using AI.

scarlet iris
river imp
solid hearth
#

Going off topic in here I see hmmyes

ivory orchid
solid hearth
#

If you learn a few real programming languages you never really have to "start fresh". You learn the key concepts and what not from them, then once you move onto something new you start to see how they blend together. It's more so true now with enfusion where as rv sqf was some ungodly pos.

red cedar
#

I love ai slop !

timid citrus
#

Gatekeeping is cool

midnight talon
timid citrus
#

Sure it is.

#

but to each their own. Have fun with it.

#

I'll be busy vibe coding 😉

midnight talon
#

Nobody is trying to stop anyone from modding Arma, just trying to encourage people to do it the "right way" where they will actually understand how their mod works and not abandon it when the next Reforger update explodes their scripts and they don't know how to fix it

timid citrus
#

I'm nodding off

midnight talon
#

Like if you're a programmer and using AI as a tool then great, but that's a bit different to people using it as a substitute for actually learning it

timid citrus
#

get off my lawn

molten glacier
timid citrus
red cedar
#

There is a huge difference between thinking we're gatekeeping and choosing to say uneducated on programming and blaming it on us lol

timid citrus
#

I didn't say you had to help anybody. But saying that they should quit modding is pretty extreme.

red cedar
#

i'm saying if there is so little passion in your modding that you think relying on AI is your only way to mod, you really shouldn't.

I understand that people have differents set of skills, for instance I'm completely lost in blender and don't even try.

but if you're trying to become a "scripter" and rely on AI, i think your time would be better spent somewhere else.

#

i had to debug and optimize some AI produced slop, the code it write is

  • unreadable
  • unmaintainable
  • made no sense and was reinventing the wheel.
  • the console log spam are proper rage bait.

I'm not trying to shit on less skilled modders(i'm not even that good), but really this will lead to some huge server performance impact in the future and the code written by ai is literally based on stolen code.

scarlet iris
timid citrus
red cedar
timid citrus
#

The same things that you reference, when you're coding by hand.

red cedar
timid citrus
#

I do not have the capability to train an a I model.I simply use an existing a I model that is on the commercial market.

red cedar
#

doesn't change the fact that this code was stolen in the first hand.

anyway let's not go back and forth on this subject

timid citrus
#

Then reading the bohemia docs with code examples in them is stolen code.

red cedar
#

it is

#

and there aren't enough examples on their website to train an ai model

coarse bane
timid citrus
red cedar
#

uh huh

#

AI to get a prototype done quickly in known language is useful(ex : python, php, c++, etc)

On very specific languages like enforce, it's rarted

timid citrus
#

Yep, it is, but you can still do it if you figure it out, and put enough time into.

#

And i'm not worried about it.You will see my work in the future.

#

Love you.

red cedar
#

love you too man

spark otter
maiden goblet
# red cedar no it isn't. - Bohemia doesn't allow their enforce code being ran through LLMs ...

Claiming hyperbolic BS like 'all AI written code is stolen" is simply trolling. It sounds like you're trying to blame your own lack of knowledge/skill on AI models; i.e. when an AI makes "unreadable" and "unmaintainable" code, that's the AI's problem somehow, not your problem. That's absurb, because the AI is just a tool. It's like trying to blame a bad painting on the paint brush, not your own hand. Take responsibility for what you put out in the world instead of using AI as a scapegoat.

timid citrus
#

But I have 50k lines of compiling functional code, and it's going great, so not worried about it.

red cedar
#

anyway i'll let you clankers have fun. cya 🫡

polar patrol
#

Sometimes when I have nothing to do, I mess around with silly stuff. Guys, check out my personal, private logic in the car.

tulip magnet
timid citrus
#

Custom game mode only one or two vanilla components left on it.I believe

polar patrol
#

only 987

#

XDD

#

My longest and biggest mod is Bodycam, followed by the re-released Bodycam 1.6, because the 1.6 update broke my mod LOL

polar patrol
#

thats true

tribal verge
#

What does this mean and how do I fix it?

timid citrus
#

You wait for the mod maker to update it or update it if there is already an update.

fringe prairie
#

Having an interesting issue where I cannot remove elements from an array on a prefab component, even though it is the original version (what it inherits from does not have this component), can't delete the component either, editing with text editor regenerates it. Going to try opening the mod on it's own and see what it does.

lime dew
#

Hello, Hope everyone is good.

I'm trying to write a user action that will only be active if the player has an item in their inventory, what is the code for checking inventory ?

Example: player can only reconfigure radio relay if they have an Encryption Device in their inventory.

I have already made the device item_EncryptionDevice_01.et

Just need the CanBePerformedScript part.

ocean needle
#

maybe omit the Get, not at pc so cant check but its something along those lines

lime dew
spark otter
timid citrus
#

About 2k over the last year or so

#

And I do understand the basics of coding.I have for thirty years but I never got good at it where I could just sit down and write code. And this fits me like a glove.

dire sinew
red cedar
fringe prairie
#

Like with anything it is a tool for mundane work, understanding is still a requirement, but there are times you'll get better support from an LLM than here (even if it takes a bit to get to the answer through questioning why things work a certain way)

timid citrus
#

Hold on to your old purist ways .I'm sure you won't get left behind.

maiden goblet
red cedar
timid citrus
#

Love you boo

#

I'll have you know, i'm the author of several.Hello, world scripts over the last thirty years

dire sinew
#

Why all the shaming? It's a hobby, not a job. People do modding for different reasons and may enjoy doing it in different ways. Nothing wrong with that.

timid citrus
#

Good thing i'm shameless

tawdry lake
#

Anyone know anyone extremely proficient in c++, our best bet to fix all of this bullshit is to "rescript" the original conflict game mode and have concrete variables.

From what i can tell the main issue is the mods are calling to nonexistent variables and components bc bohemia completely rescripted the conflict game mode to create the commander conflict mode

desert escarp
#

Has anyone noticed entity spawn times are kind of insane in 1.6. Before in our gamemode when we advanced past the phase when everyone slotted we were able to spawn 70+ player characters, with gear, and vehicles with only like a 5-10 seconds delay before they populated to the actual players. As in you get sent into the player and have to wait like 5-10 seconds before seeing all the other players.

Now in 1.6 it takes upwards of 30-60 seconds

#

This then also extends to when they reconnect and go back into their character, it takes them around the same time to load all the characters around them again

red cedar
desert escarp
#

Now its completely detrimental to gameplay as you get kicked and now pretty much have to wait a minute to play again and in that time you can still get shot

red cedar
desert escarp
#

This was an old issue way back in 1.2.1 as well but that update was cursed

river imp
#

Are you using persistence?

desert escarp
#

Honestly, no clue

#

How would you turn it off

river imp
#

Their character will spawn in regardless of them being connected.

desert escarp
#

No like reforger lobby style of characters, we dont have persistence like that

#

Like you pick slots, then going into the game state and all the characters spawn in for the players

#

Then if they disconnect we handle keeping the entity and putting the player back into it on reconnect

river imp
#

I don't know what to tell you then. If you're not using vanilla persistence then it could just be how you're hadling all of that.

desert escarp
#

How do I disable it?

#

Just disable the component in the base gamemode?

trim aurora
#

Hey did anyone manage to set flags on an object since 1.6, yet?
It is driving me insane, that I can not set the Relative_Y flag per script and the ticket I made will probably stay unresolved, so maybe someone knows a workaround.
Original message for reference: #enfusion_scripting message
(I also tried SetFlags, ClearFlags, but it has the same behaviour)

midnight talon
kind widget
#

Not only characters, but vehicles and items around too

#

End sometimes even already spawned storages are empty for like 10 seconds

vernal moat
#

getting this at every recompile scripts, new 1.6 feature or a me problem ?

ocean needle
#

i have a key combo i need to press every script refresh now

#

shift+f7 > > enter

timid citrus
#

Ya hopefully fixed in another hotfix or 1.7 at least its annoying af

pseudo merlin
delicate anchor
#

I'm a little confused about the relation between components and their owner entities. Is it correctly assumed that GetOwner() refers to the entity that holds the component? Or is it GetParentEntity()?

I have a reference to an SCR_EditableEntityComponent, and I want to Get the entity "root/owner" of that component. However I haven't been able to successfully retrieve that with the above methods.

What am I doing wrong here?

#

(owner.GetName returns nothing) <- EDIT: Hmm, I actually do see the owner on Watch. So it's just GetName that's not returning anything

oak thorn
#

could try something with owner.GetPrefabData().GetPrefabName();

#

@delicate anchor

dire sinew
#

GetOwner is indeed the correct method for getting the entity that has the component. GetName just returns nothing, since your entity has no name.

#

What Kodii suggests is how to get the resource name of the prefab of the entity

delicate anchor
#

Awesome, thank you both. I incorrectly assumed that an entity from GM would have a random name assigned.

dire sinew
#

No, you either have to set a name via SetName or when you place them in the world editor. Most entities won't have a name though.

delicate anchor
#

Understood, thank you

ebon escarp
#

How can I crack open a mod and look at the scripting inside of it? I'd love to learn from the examples of others, e.g. ACE

#

I hope cloning from an open source version control server (e.g. Github) isn't the only way

#

In Arma 3, we can just use a PBO archive app to "unzip" a mission and check the SQF files indivdiually.

timid citrus
#

Lol probably the wrong place to be asking

scarlet iris
silent shard
#

Mhm, you can just add the mods in question to the project menu, right click on your actual project, select "Open with Addons", and boom. Should be able to view their scripts without making your mod dependent on theirs. Additionally, ACE-Anvil does have a git repo, but you probably already knew that: https://github.com/acemod/ACE-Anvil

GitHub

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

ebon escarp
#

This knowledge is very important for people who want to learn scripting, because we will never have exhaustive quality documentation: we always must learn from the examples of others.

minor agate
#

No need to unpaxk anything and such. Its open.

ocean needle
#

might need to re-read the replication stuff but how do i for example call a server only game system function from a scripted user action?
every combo of rpc call i tried hasn't worked

minor agate
#

And call the rpc from that one

#

Key thing here is that the client has to be the owner replication wise

#

Only when a client is owner, you can issue rpcs to server

#

You can create a component and slap it into the playercontrollee prefab

ocean needle
#

ahh ye client is not owner in my case

minor agate
#

That component then will be automatically set to be owned by the client it belongs to

ocean needle
#

nice tyvm

rapid ferry
ocean needle
#

thats what i thought too but my script invoker wasnt being invoked

minor agate
#

But he said method so i thought perhaps he wants data or logic more complex than that

ocean needle
#

ye i need to send a rplid

dire sinew
#

Also keep in mind that the entity that owns the action should have a RplComponent, as otherwise it won't be able to execute PerformAction on the server.

ocean needle
#

👌 ye checked those boxes before asking ty

trim aurora
#

Does anyone know why the System.MakeScreenshotRawData() command only screenshots the ui elements when used in the world editor and completely hides the terrain and objects? (The white outline is a building and the red outline is a ladder going up that building).

midnight talon
#

Is there any way to apply a VObject to an entity w/o actually rendering it?

I have a loot container entity and wanna apply the parent entity VObject to it so the meshes align, but don't want to actually show the copied VObject mesh, just match its parent for stuff like actions

midnight talon
#

.Show(false) seems to do nothing, deleting visible entity flag does hide the mesh but also stops actions from working 🙁

midnight talon
#

or is there any way to link an action manager component to the parent mesh or something? THINKING

covert kestrel
#

Hi. I have a prefab of the main base with a spawn point inside. How can I deactivate or activate the spawn point at a certain point?

abstract crescent
#

Has it always been required to specify the attribute in modded classes (like "[BaseContainerProps()]"), or is this new feature in 1.6?

pliant ingot
#

Modded class just create new class with same name and insert it after original

midnight talon
#

Yeah decorators need to be copied across to modded class otherwise they get clobbered

abstract crescent
#

oh. thx for answers. that means i never modded classes with attribute blobcloseenjoy

pliant ingot
opal loom
#

Any clue server keeps crashing because of this ?
Virtual Machine Exception

Reason: NULL pointer to instance

Class: 'SCR_FactionManagerSerializer'
Function: 'Serialize'
Stack trace:
scripts/Game/Systems/Persistence/Serializers/Entities/SCR_FactionManagerSerializer.c:50 Function Serialize

torn bane
ocean needle
#

are there any lsps for enforce?
i found a tree sitter plugin but no lsp

torn bane
silent shard
#

Can't wait to write Enforce scripts in Emacs

scarlet iris
#

can anyone help? How can I properly replicate this? It works perfectly in local testing but not on the dedicated server tool. This mod shows real time map markers for all AI on the map.

dire sinew
midnight talon
#

Seems to be some funky RPL issue, works fine in WB local but not PeerTool

#

Although it doesn't happen on DS either, just when using localhost+PT in WB 😕

solid hearth
#

Ever since 1.4 I've had so many weird issues using localhost+PT that I just stopped using it altogether, it's either diag dedicated or nothing.

#

One of the issues I had was the peerclient was using the published version and not the project version which led to mismatch of data, only solution i found was deleting the published one from my addons folder. This is probably what's happening.

midnight talon
#

TBH I've been avoiding using WB DS Tool because I couldn't seem to get the launched Peers to detect my addons regardless of params I throw at it and it doesn't seem to have any nice/clean way to kill the DS+Peers from WB UI though I probably just missed that.
But since I've been noticing more inconsistencies between LH+PT vs DS I should probably get that figured out.
WB could really use a "command palette" global search function

#

Oh wait I did end up getting peers to detect addons, they just seem to never connect to DS and hang on loadscreen so maybe a port issue

fringe prairie
past berry
#

What is the best way to get current camera position?
A: ```cs
World tmpWorld = GetGame().GetWorld();
if (!tmpWorld)
return false;

    vector cameraMat[4];
    tmpWorld.GetCurrentCamera(cameraMat);
    
    if (!cameraMat)
        return false;
        
    vector posPlayer = cameraMat[3];```
    
    B: ```cs
    CameraManager cm = GetGame().GetCameraManager();
    if (!cm)
        return false;
    
    CameraBase currentCam = cm.CurrentCamera();
    if (!currentCam)
        return false;
        
    vector posPlayer = currentCam.GetOrigin();```
carmine fog
#

Since update, With Inventory 2.0, ive had a nightmare trying to fill containers. Has anyone solved a similar issue. Could it be we now need physical containers attached to objects rather than relying on the virtual containers? In workbench I can get loot spawning inside objects but they do not work serverside. Quite a few days on this one.

torn bane
past berry
#

I think both will work at the same speed

torn bane
#

Speed wise its hard to tell, might need to be measured, but its definetly some micro optomization not worth your time.

tulip magnet
austere crown
#

do you have solution for this Scripts/Game/generated/Components/DoorComponent.c(1): error: Invalid inheritance, 'DoorComponent' must inherit from 'BaseDoorComponent'

tulip magnet
austere crown
#

@tulip magnetim send you on private and creat new component

#

im add you @tulip magnet

tulip magnet
#

yip yip i see you

#

but I think it's just that every component on the door entity has to inherit from basedoorcomp and that thats not what happened after you made a new one or smth

deep cradle
#

I'm trying to create a reinforcement system where users place spawn point entities as children under a parent entity in the World Editor hierarchy (by dragging them in the editor UI). However, when I use GetChildren() at runtime, it returns null - no children are found, even after delaying the check by 5+ seconds.

Does GetChildren() only work for children defined in the prefab's .et file structure, or should it also return entities that were added as children in the World Editor (instance hierarchy)?

If instance-parented children aren't accessible via GetChildren(), is there an alternative API to query entities that were placed as children in the World Editor hierarchy?

delicate edge
#

Has anyone was able to set up fog in multiplayer using TimeAndWeatherManagerEntity/SCR_TimeAndWeatherHandlerComponent? For me it works only in SP, peer tool and dedicated server clients don't seem to register weather changes

delicate edge
#

Nvm, found the solution - executing weather change late affects the clients as well

desert escarp
#

Whats the proper way to teleport a vehicle with players inside of it?

#

Would it just be updating the world transform on the auth and then broadcasting that change?

desert escarp
#

Currently getting this bug when teleporting a vehicle

#

It just kinda floats in the air for anyone whos not the driver

#

And then almost randomly it pops back up

#
// Teleport or transform entity
BaseGameEntity baseGameEntity = BaseGameEntity.Cast(vehicle);
if (baseGameEntity)
  baseGameEntity.Teleport(params);
else
  vehicle.SetWorldTransform(params);
            
// Reset physics to prevent unwanted movement
Physics phys = vehicle.GetPhysics();
if (phys)
{
  phys.SetVelocity(vector.Zero);
  phys.SetAngularVelocity(vector.Zero);
}
#

Copied the base method on teleporting vehicles

ocean needle
ebon escarp
ocean needle
desert escarp
desert escarp
ocean needle
#

that is weird, ik you can force that behaviour by setting the wheel radius for each wheel to be huge but i doubt thats related

#

i wonder if the height off the ground is the diff between its current and prev terrain Y

desert escarp
#

No clue tbh\

#
vector initialSpawnLocation;
SCR_WorldTools.FindEmptyTerrainPosition(initialSpawnLocation, cursorWorldPos, 10);
vector params[4];
params[3] = initialSpawnLocation;
            
SCR_EditableEntityComponent editableEntComp = SCR_EditableEntityComponent.Cast(vehicle.FindComponent(SCR_EditableEntityComponent));
editableEntComp.SetTransform(params, false);
#

This is literally all I do and I replicate it every time

#

It initially spawns in the right location then after about a second it pops up like a meter off the ground

ocean needle
#

xD happens for me too

#

i think the physics is getting deactivated maybe

#

nvm i guess

river imp
river imp
#

"This is literally all I do and I replicate it every time"

#

Neverminnd

#

Misread that

#

my bad

#

I read "every frame" lol

desert escarp
#

Lmao

river imp
#

Try just setting the transform of the vic

#

Instead of the editable entity component

#

if that doesn't work try SCR_TerrainHelper::GetTerrainY and setting the Y of your transform to that value.

desert escarp
#

Manually teleporting and broadcasting the change sends any player in the vehicle into null space

solid hearth
#

Hey I know that place, its 0,0,0 cute_smile_cat_meme

river imp
#

You don't need to broadcast the teleport, just call it on the server.

desert escarp
solid hearth
#

Just by looking at the call chain on SCR_TeleportPlayerHereContextAction which is the action GM menu uses it calls SCR_Global.TeleportPlayer on every client (if its a vehicle)

desert escarp
river imp
solid hearth
#

shrug that's just how the GM menu does it. There's probably some weird issue with the movement component syncing properly which is leading to the issue he originally showed.

#

There was also some commented out code referencing that the movement component should handle it but since it was commented out i didn't bother reading it all

desert escarp
#

This works

solid hearth
#

When facing a wall, dig through their code hmmyes

desert escarp
#

I'm not gonna question it, I'm just gonna mind my business and tuck this into my pocket

solid hearth
#

Like I said it's probably some weird issue with movement component not syncing fully which is why they do it. Would make sense if it pops up after a second. That second would be the movement component resyncing.

dire sinew
#

First Cloudflare, now GitHub? What a day!

open pier
#

My ISP is having outages too 8^)

ivory cobalt
#

might be of use to some one here;

and Ive written a script that scrapes my json persistence .save shit from 1.6
and trims out everything except the player co-ords and their gear every server restart (in my restart scripts runs this first)
so stays below the 16mb limit

(noting this is python and to be run on server side. I run this in my start up scripts so that it purges after servers shutdown and just before it starts again)

ocean kernel
#

huh

high hawk
#

Think it's missing a script declaration for those classes, hope this helps

pliant ingot
torn bane
# ocean kernel

You probably mis matched gproj of exp and stable with the other workbench

ivory cobalt
#

EDIT to above persistence trimmer; you will want "System" in essential sections too or factions are lost etc

true haven
#

If i want to test an scenario with 2 players not only one how can i do it in Tools?

queen silo
torn bane
fringe prairie
ocean needle
#

on that note, is there any way i can stop having my peers get kicked with a duplicate player identity error?

restive island
#

Is there a simple prefab component that manages player XP when transporting supplies/troops or is it all scripted? Looking to make it classify transporting fuel in fuel truck as gaining XP in my mod.

restive island
#

I get this thingy with scr_XPhandlerComponent. The other XP component is just a enable checkbox

#

guess i can yolo and ignore it

scarlet iris
restive island
#

ahhhh i see fueling support is a reward type, but not enabled o.O game mode as in I need to load an environment in viewport?

#

i guess that makes sense, i thought i could tie it to certain vehicles

scarlet iris
tough cave
#

BI should create two test world templates. one for Conflict and one with a barebones game mode. too many assumptions are made around Conflict, even in BI's own code. no one tests if their mods work more generically, which is the point of the component system in a sense. and that's what the old Arma games were about. many, many scenarios.

river imp
#

They have a bare bones world. It's called "MPTest"

tough cave
#

they have a single lego, if you can call it that.

lofty nest
#

would anyone who knows the engine a little like to help me with a project? I just need somone who can access the wrokshop i have the scripts and guide ready

gloomy lynx
#

anyone done any modding to the supply system?

#

specifically the logistics parts, like loading/unloading/transporting

desert escarp
#

Is there anyway to grab how large the rpl bubble of a server is?

river imp
#

Depending on what you're trying to test, you may not even need to create a subscene.

tough cave
# river imp Depending on what you're trying to test, you may not even need to create a subsc...

the status quo isn't working, and I appreciate the suggestions, but I am making a suggestion for BI to help themselves and creators out. better templates are needed, even for when they introduce new components that always seem to become a prerequisite for a bunch of other core components. in any case, I already know what is possible, and it's "trivial", but I am a advanced user with a custom game mode I created. the problem is pretty apparent when even BI's own code has components and UI that is not contained within the Conflict game mode and blocks the generic version of code they also have. it's like a weed now. and I see the same from large mod creators that seem to aim for generic code, possibly. they probably do not want to be stuck with Conflict despite how popular it is. it also seems like BI is not really using the same tools we are because they aren't annoyed by the same things like the spam screen every time you compile scripts. and if we are talking about minimalism, I doubt almost anyone is using the test runner. they may not even know it exists. I also mentioned on day 1 of the update that debug defines were broken, so dedicated server tool, servers, and workbench were running in the wrong environments. I came back days later and the devs still didn't acknowledge the problem. I realize I have to write tickets when I really want it fixed, instead of letting bigger groups maybe talk to the devs or something, but it's like a job when you have to be super detailed there. so, I hope you see how missing this (and the big assumption) is creating long-term problems, especially around mission (with test world for quick, repeatable testing) and other related testing.

river imp
#

This entire discussion has nothing to do with scripting though and should have been brought up in an appropriate channel.

tough cave
#

there's a lot of discussions like this, and it's a scripter's topic, I think. mission scripting and all that. you can reply in a thread if you think it's turning into a larger discussion, but I was talking about the issues affecting scripters and the road every (mission) scripter is on. and I was originally just putting the suggestion out there for ppl that specifically frequent this channel mainly to see, and I also made a ticket for BI about an exact issue in this vein.

fringe prairie
# desert escarp Is there anyway to grab how large the rpl bubble of a server is?

This is a good question, a quick hack I can think of (if you are dealing with entities that may or may not exist on client) is using their RplId to try to resolve the entity on the client, if it resolves, it is in distance, if not, out of distance (or deleted). But since it is a server config setting not sure how you'd get to it otherwise without an exposed helper.

restive island
queen silo
analog python
queen silo
analog python
#

we can use that too but we just prefer debug, looks nice in the log console

#

or maybe verbose is locked, I would have to double check

#

it works ya

torn bane
mossy spade
# restive island You don't need to be super detailed with the bug reports on the BI tracker, just...

If it's a very technical bug, the more information about what you're experiencing the better.
The point with very technical bugs is often you need to set up a repro project to prove they actually exist, because no one is going to invest multiple hours trying to verify if the issue is even real, when you have dozens of other actionable problems in the backlog. And it's a perfectly reasonable triaging strategy.
But there's absolutely no incentive for me to invest the time required for that if the report won't be acted upon in any reasonable time. If I have a problem that's blocking my project right now, I don't care if it'll get fixed in 8 months in the 2nd major release from now. For me, that time is much better spent finding a workaround/bandaid solution right now.

#

The above is not a rant, but rather an explanation of why there is relatively little proper bug reports compared to amount of complaining about broken stuff in the Discord.

analog python
#

oh sorry you mean workbench is a diag exe

#

ignore, I havent had my coffee

torn bane
minor agate
queen silo
mossy spade
# minor agate Issue with such strategy of bandaids/workaround is that usually they are hackaro...

So in the long term it is worse.
Yes, it is, it also often impacts negatively code quality/performance/and so on. But there's no alternative (other than putting a project on hold indefinitely), so that's what happens organically.
And the original issue never got resolved if no one pointed it out.
Again, yes, but it impacts negatively the platform, not the modder's project (because they already have a working bandaid). And the modder priority/motivation is their project, not the platform (regardless of how noble would it be otherwise).

minor agate
#

I think you are not seeing my point

#

It does affect you worse, as hackarounds are fixed. And when a hack is fixed, no secondary way of doing it is provided.

#

as it's usually based on bugs or misusage.

#

So there is also no way for us to even tell you about it and what to do instead.

#

Only thing you would see, if lucky is a log about "Bug/Issue/API fixed/removed/changed"

#

Then that will happen, initial issue is also not provided because you never reported it. So your mod is truly broken for good then.

ebon escarp
#

It seems like maybe this isn't true, or that there is something you forgot to mention? Maybe there is a debug flag which must be true in order for the method to be called. I've looked at the DebugMenu doc in the BIKI, but it seems to be a completely separate concept from the DbgUI concept. I've also tried searching the chat history here but I only see people mention using it, as if it "just works".

minor agate
#

And then, you report your issue and it will take longer to provide something for.

#

You do not have to make a technical report

#

That does not help much at all

#

All you need is to express your idea in any way, can be a few lines

#

And a repro for testing your issue

#

Which can be a mod or so attached to it

#

or just explained quickly in text

#

There are programmers dedicated to bug and feature requests of modders now

#

So it is faster now.

mossy spade
# minor agate I think you are not seeing my point

I see what you mean, but then you're describing a very specific subset of problems (and one which I never actually ran into, so it's not really relatable to my point). Real world examples on my side are:

  • hard crashes that can be worked around by deferring the call to a frame later
  • bugged proto methods -> worked around by reimplementing the logic in script (slower, more code to maintain)
  • bugged / opinionated / Conflict-oriented logic in generic classes -> worked around by either a lot of overrides, sometimes being forced to skip super.XXX() calls, or making a clone of the class and using it instead (poor mod interoperability, fragile on base game updates)
minor agate
#

And should be reported

#

if it's bugged, you make bug report

#

You might even do your entire logic for your system on a bug, and then fixed and your entire mod is now useless

#

and you have to rework everything.

#

We might even be able to provide a quick API that even saves you months of dev. as has happened to modders before.

#

If you avoid talking to us, then we can't help you

#

And we can't take your usage into account when updating the game/engine if you do not tell us.

mossy spade
#

hard crashes that can be worked around by deferring the call to a frame later
If you fix the underlying crash it does not make my deferred call not work anymore. It only makes my bandaid superfluous. By now (since 1.1) I probably have a bunch of bandaids in my codebase that could be removed, but again, they did not become a problem.

minor agate
#

hard crashes that can be worked around by deferring the call to a frame later
Biggest crash inducing practice

#

It's banned internally on A4 for example

#

That is why you will not have call laters and so

#

bugged proto methods -> worked around by reimplementing the logic in script (slower, more code to maintain)
Biggest way to cause leaks, crashes and other issues in logic as many things when done in proto are handled in CPP for a reason. And you can't see dependencies

#

bugged / opinionated / Conflict-oriented logic in generic classes -> worked around by either a lot of overrides, sometimes being forced to skip super.XXX() calls, or making a clone of the class and using it instead (poor mod interoperability, fragile on base game updates)
Skipping and duplicating logic, also biggest issue inducing.

#

As I said. Hacks