#enfusion_scripting

1 messages · Page 26 of 1

inland bronze
#

Because otherwise, if I’m burying a backpack, it can just be equipped and subsequently unburied. This is supposed to be the catch all to not allow any actions to be shown or performed BUT the unbury action when a shovel is in hand

river imp
#

How are you handling not showing in vicinity?

gloomy lynx
#

has anyone successfully replicated attaching something to a slot of a vehicle on a dedicated server?

inland bronze
# river imp How are you handling not showing in vicinity?

in a modded class of SCR_UniversalInventoryStorageComponent

override bool ShouldHideInVicinity()
{
    CONVICT_BuriableComponent buriableComp = CONVICT_BuriableComponent.Cast(GetOwner().FindComponent(CONVICT_BuriableComponent));
    if (buriableComp)
        return buriableComp.IsBuried(); // if item is buried, don't show in vicinity
}
gloomy lynx
#

ive gotten as far as attaching something but it doesnt actually attach until i go outside of render range and come back

inland bronze
gloomy lynx
#

thank you.... ill try that lol

#

use canbeshown or canbeperformed (for the user action)

river imp
#

InventoryItemComponent:HideOwner();
InventoryItemComponent:.RequestUserLock(pOwnerEntity, true);
InventoryItemComponent:DisablePhysics();

#
modded class SCR_UniversalInventoryStorageComponent
{
    override bool ShouldHideInVicinity()
    {
        return IsUserLocked();
    }
}
gloomy lynx
#
    event bool CanBePerformedScript(IEntity user) { return true; };
    //! Can this entity be shown in the UI by the provided user entity?
    event bool CanBeShownScript(IEntity user) { return true; };```

located in ScriptedUserAction.c
inland bronze
#

wouldn't user locking block all actions?

gloomy lynx
#

you would put that in a modded user action or your own user action

#

it should only effect the action you put it in

inland bronze
gloomy lynx
#

yeah if you modded the scripteduseraction it should apply for every action

inland bronze
#

it's a generated class, so it can't be modded

gloomy lynx
#

ah dang right.

#

i sent u an example of how i use it in your dm

inland bronze
#

I appreciate it, but unfortunately it doesn't apply to what I'm needing to do

gloomy lynx
#

so you have a box that you want to shut off the actions to when some variable is met?

#

is that the gist of it?

#

delete the box and spawn a placeholder with no actions?

#

\or move it to the sky somewhere

inland bronze
#

Not an option, it has a storage to it. Currently it changes the mesh to a "buried" mesh, and is supposed to disable all actions but the unbury one. Then when unburied, it reenables the actions and changes the mesh back

gloomy lynx
#

you should be able to do that with canbeshown using a boolian for buried

#

and you would only have to put it in the bury and unbury actions

clever marlin
#

why dont you just transform the entity underneath the terrain?

inland bronze
#

yeah, that part is fine. The bury/unbury actions are setup and they work fine. The part I'm having issue with is the disabling of all the actions the buriable entity can perform (ones that are not the bury/unbury actions). But since it's a universal component to be potentially added to any entity, I need a catch all solution to disable the other actions.

The disabling of actions work fine in workbench, I was originally just confused why it wasn't working on peer even though I RPC'd it to the server

gloomy lynx
#

ah yes you would have to add it to every action =\

#

canbeshown can only be called inside the action im pretty sure

storm bobcat
#

Is there a way to get player IP and BE GUID in a script and log it?

inland bronze
#

what's the reason for player IPs? Hmmm

storm bobcat
#

Temp banning IPs due to prevent ban evasion

#

Its in logs, but all the relevant info is split between different lines and I would like to log it all it once in a custom log for easier processing

storm bobcat
#

Also where is the class/functionality for custom rcon commands?

inland bronze
river imp
#

Gotta have the server manually parse the log file.

gloomy lynx
#

could then make a discord bot that watches the end file and sends it to a discord channel

#

and flags matching ip's

inland bronze
#

so for an update to this: From testing, I believe the method SetActionEnabled_S() is borked and doesn't replicate properly like it should. It doesn't disable the actions for those who have the entity streamed in initially, but does disable the actions for those who don't have it streamed in initially

odd berry
#

Anyone know how to disable a vehicle in the Conflict vehicle spawners? Sort of like when they're on cooldown

amber moat
#

It’s definitely in some component inside the vehicle itself or there might be a more general setting in the conflict config

#

Not sure though

#

Should be SCR_CatalogEntitySpawnerComponent or SCR_VehicleSpawner

tired geyser
#

One question: can't the server change the player's position?

#

I tried to change a player's position using SetOrigin from the server, but it doesn't work.

river imp
kind widget
# tired geyser I tried to change a player's position using SetOrigin from the server, but it do...

Something like this

    [RplRpc(RplChannel.Reliable, RplRcver.Server)]
    protected void RPC_TeleportPlayer(int targetId, vector position)
    {
        IEntity player = SCR_PossessingManagerComponent.GetPlayerMainEntity(targetId);
        if (!player)
            return;
        
        SCR_EditableEntityComponent editableComp = SCR_EditableEntityComponent.Cast(player.FindComponent(SCR_EditableEntityComponent));
        if (!editableComp)
            return;
        
        vector transform[4];
        player.GetTransform(transform);
        transform[3] = position;
        
        editableComp.SetTransform(transform, true);
    }
#

Actually check SCR_EditableEntityComponent::SetTransform usages

storm bobcat
torn bane
tawny lotus
#

When adding a value to EEditableEntityLabel, is this the recommended way?

{    ENTITYTYPE_MYTYPE
};```

I am asking because some mods tend to add random const value to it. ..with a risk of collision.
open pier
#

Toss a comma at the end of it. I see that sometimes and just keep it there just incase. I figure if there's another modded enum of that class then the comma at the end even if there's nothing after, will be used to separate the next mods modded enum

pseudo merlin
tawny lotus
#

Using a random big number just feels dirty.

pseudo merlin
#

True.
Not sure if it even requires one tho.
They use numbers in vanilla and most modders are using numbers as well.
But yeah no clue. blobdoggoshruggoogly

restive island
tawny lotus
sonic forum
#

How performance-intensive would it be if I increment a float by 1 on EOnFrame for a trigger? (Assuming the rest of the math logic and damage calculation are handled separately.)

torn bane
limpid bloom
#

Is there anyone who knows a script or component that allows random spawning from the "Character_USSR_Randomized.et" file?

sonic forum
#

For example, I'm using a BaseGameTriggerEntity. I have, say, 200-300 of them on the map, and let's say 100 players will simultaneously enter the trigger (not necessarily the same one). They'll get +1 to the float variable every frame until they exit, and that's it.

torn bane
minor agate
#

I would say, expose it from CPP with same values and set the pivot to the current max in vanilla. So that we do not break configs and prefabs for modders for those implementations that store it as int and not enum.

cobalt shadow
visual atlas
#

any way to get client ips from server? i know parsing the log but hoping to bake some functionality into an addon without requiring other setup

robust sentinel
#

nope

#

IPs are handled via battleye I believe they arent exposed in the base game controllers

visual atlas
#

can battleye rcon access them?

robust sentinel
#

otherwise I feel like they could be used maliciously and no only logs display it

#

I think it was built that way for security reason and preventing scriptors/hackers from obtaining IP addresses

visual atlas
#

that makes sense

#

use case is im working on some admin tools and would like the ability to check multiple accts on the same ip etc

robust sentinel
#

Yeah, unfortunately it isnt possible without doing it via a rcon panel that parses logs and identies of players

ocean kernel
#

At least unlike Reforger RCON, it works properly too

visual atlas
#

very nice. is there a reference of be rcon commands?

visual atlas
inland bronze
#

In the case of a vanilla class not having a constructor, what happens if I add one in a modded class of vanilla class? What happens if two different mods do the same?

visual atlas
#

ooh i see be rcon #players returns ips

ocean kernel
# visual atlas ooh i see be rcon #players returns ips

Yeah it's quite simple. In your case you could use the service API to run BE RCON commands but that would vendor lock you, so I would still recommend using BE RCON directly for your use case to stay independent, whichever is easier/more important for you. The other difference being that the service API doesn't require you sending your password in plaintext, as it auths you via bearer token and then connects via localhost remotely (that sounds weird, but it should make sense).

visual atlas
#

yeah makes sense. so is rcon port even exposed directly by default? or restricted in docker network

ocean kernel
#

You may need to toggle a checkbox for BE RCON

torn bane
elder wigeon
#

Is there any signal/event sent on prefab/object destruction that I can use to terminate a script started from this prefabs action menu? Please tag me here if you reply, answers get lost here easily without pinging🙂

ocean kernel
#

What about the destructor

dire sinew
elder wigeon
#

@dire sinew @ocean kernel is it explained in official wiki or anywhere else to feed it to AI and get something potentially working?🙂

dire sinew
#

Feeding to some LLM sounds like an IP nightmare...

minor agate
ocean kernel
elder wigeon
storm bobcat
#

How do I make custom rcon comands?

ocean kernel
# storm bobcat How do I make custom rcon comands?

Inherit ScrServerCommand, have a look at some simple one already existing like #players. It is quite simple you get an array of arguments and have to return a specific result type for basic commands.

storm bobcat
#

Appreciate. I couldnt remember the class

ocean kernel
torn bane
elder wigeon
torn bane
dire sinew
#

With the caveat that if you want to interact with other components on the entity, to use EOnInit instead, as it is called after all components are initialized.

elder wigeon
#

Thank you! @dire sinew @torn bane @ocean kernel , ondelete should work for me

inland bronze
minor agate
#

It was not a decision we took in recent years

#

Our IP and EULA have never allowed for this

lean moth
red cedar
minor agate
ocean kernel
#

So when something is moved from a component to componentclass

#

But I need it to remain on the component because of state

#

Wat do

#

Do I have to mod all the classes that use it and make shit code?

shrewd nova
ocean kernel
#

It's more like there is one bun for many bacons

dire sinew
ocean kernel
#

Specifically SCR_SpecialCollisionHandlerComponentClass.GetSpecialCollisionDamageEffects which used to be on the Component

#

I was doing a funny and returning null under some conditions

dire sinew
#

Yeah, I get the pain 🙈
SCR_EditableEntityComponent::GetInfo, for instance, has a nice pattern that uses the component data by default, but can be overridden by a custom instance. Unfortunately not applicable here, as the getter is on the ComponentClass.

scarlet umbra
#

so i want to write a small script that disable the ability to respawn from menu when unconscious IF there are conscious Teammates within 100m. Can anybody help me out (have coding expereince, new to enfusion...)

vernal moat
#

id say first learn how to make a mod/override stuff scripting wise, then check how to get some entities/players pos stuff and then check how vanilla game does handle the UI of this respawn button and then combine it with previous entities pos knowledge

#

and dont forget to enjoy the journey

storm shore
#

How can I show a custom image for an item in the player's inventory instead of the default preview of the item's prefab?
I've set the Icon in the InventoryItemComponent, that doesn't seem to have any effect

(Asking in this channel because I've not had a reply in three other channels over the past few days)

tough cave
#

NVM, messed up my gamemode temporarily. that's strange: why is debug skipping over some of my functions (that return a class)? even with step into or breakpoints inside.

deep bolt
#

hi- quick question

i am a little new to scripting in arma reforger enfusion. s

soo have a little hard time to find in the
Arma Reforger Script API.

i want for Debuging purpors

change the Spawn Timer on Vehicles from 300 sec to 10 sec or remove it completly .

what i have tried does not work ,

// ==========================
// DEBUG: Override vanilla spawn protection
// ==========================
if (PopVehicleLimitConfig.DEBUG_OVERRIDE_VANILLA_PROTECTION)
{
SCR_VehicleSpawnProtectionComponent protection = SCR_VehicleSpawnProtectionComponent.Cast(
ent.FindComponent(SCR_VehicleSpawnProtectionComponent)
);

        if (protection)
        {
            protection.SetProtectionTime(PopVehicleLimitConfig.DEBUG_VANILLA_PROTECTION_SEC);
    
            PopVehicleLimitLog.Log(string.Format(
                "Spawn protection overridden to %1 sec",
                PopVehicleLimitConfig.DEBUG_VANILLA_PROTECTION_SEC
            ));
        }

any suggestions ?

pseudo merlin
deep bolt
#

thx will try

clever oxide
#

Hi! I found this in scripting conversions and maybe need some clarification:

It is important to keep moddability in mind when scripting to ensure. Modded classes work very similar to inherited ones and come with the same restrictions:
Constructor/Destructor: a modded class has its own const/destructor and cannot modify the parent one```
If i want extend the destructor in modded class, do i need copy all lines from original class by hand?
#

ah NVM, breakpoints stops the game on modded and then original destructor too, all fine, both runs.

sweet badger
#

I ran into another issue related to deleting entities.
Basically, when deleting non-replicated loadtime entities on the server, they will still appear on the client if they are not destructible. For example, destructible trees are removed successfully for a joining client, but not bushes that don't have their DestructibleEntity "Enabled" box checked.
I assume this is related to Regional Destruction Managers? I heard they are responsible for replicating destruction of otherwise non-replicated loadtime entities.
So these probably won't take care of anything that's not destructible - so deleting any loadtime entity is impossible without manually writing some system like the Regional Destruction Manager that handles deletion of any entity?

sweet badger
#

Also, I don't think the World Post Process event is correct for safe deleting. First of all, it doesn't work at all for replication to clients, and secondly it complains about it ("was destroyed during loading. This may break item table for JIP").

torn bane
#

Maybe it was one frame later. There is also a replication runtime started event on world systems that is definitely correct to implement deleting on.

#

And yes there is no logic to remove non replicated entities. If removing them is not deterministic then you need to implement your own sync to remove them when they reappear. Best would be to delete them with an entity placed on the map, so if a client re-enters the bubble the deletion is repeated

#

And the regional destruction system is exactly our solution to the problem. A lightweight system to avoid making all of those loaded entities replicated

#

You can't magically delete them on the server and have the clients know about it. PrefabDeleteEntity or custom system, or destruction or full replication. Those are your options

sweet badger
#

To me it sounds like replication by deterministic loadtime entity ID is the only good approach here, like the regional destruction managers do. It's unfortunate the game doesn't have a generalized system for this and only handles destructibles.

vagrant veldt
#

what am i doing wrong?

torn bane
torn bane
vagrant veldt
#

in some case they do the same thing

sweet badger
vagrant veldt
#

okk thanks @sweet badger

fading bane
#

General question about scripting chats to an entire server. Does the ShowHelpMessage display for all players? If not, any ideas on what would?

sweet badger
fading bane
#

I was attempting to broadcast a help -styled message

#

Guess I just don't have a way to confirm others are seeing it yet

sweet badger
fading bane
#

Any docs/guides on those? Nvm, think I found it

odd berry
#

Anyone able to help me figure out how to grey out/disable a specific vehicle in the Conflict vehicle spawners? I've been struggling for days trying to figure it out

#

I've managed to make a script that tracks how many of a specific vehicle/prefab are alive in the world and register limits for how many total I want to be allowed to be spawned in at once but I can't work out how to disable them if they meet/exceed the limit

scarlet umbra
storm bobcat
#

Im looking to add an event for when people place down vehicles from the vehicle depot menu. Does anyone know where the code is for it?

#

Or does anyone know where the code for spending the supplies when placing a vehicle is?

strong socket
#

Would this be the place to ask about els light?

dire sinew
dire sinew
dire sinew
ocean kernel
#

okay so

#

do I just mod everything that uses the damage effects that moved to componentdata

restive island
dire sinew
#

No, what I meant is introduce your own custom budget type. There already is a budget framework for editor modes, such as building.

lilac surge
#

hello, Is there a way to reset your rank when you die? If not, can you help me with a script to do this, please?

red cedar
torn bane
boreal swan
#

How's the portability of scripts from Reforger to A4? I guess their APIs will differ so you can't directly port the code?

torn bane
boreal swan
quiet glade
#

Question, I want to create more custom scripts (for example I created a script that will sent the in-game events to my webserver - not tested yet) but I want to learn more about scripting, any tips what I can do to grow in this? I'm a php developer, so the coding self will not be the problem (or AI will help) I think is more where do I put the code etc

dire sinew
amber moat
amber moat
quiet glade
#

Would appreciate that! Because when I read some tutorials on that wiki is says “create this class” then I wonder, where? And why there? How does it get loaded in the first place etc

amber moat
#

// MyWebhookCallback.c

// 1. Handles the HTTP response
class MyWebhookCallback : RestCallback
{
override void OnSuccess(string data, int dataSize)
{
Print("[WEBHOOK] Success: " + data);
}
override void OnError(int errorCode)
{
Print("[WEBHOOK] Error: " + errorCode.ToString());
}
}

static vale
#

How can i apply physics impulse to a player while they are standing still? It seems like applying an impulse only works while the player's velocity is greater then zero?

Physics physics = player.GetPhysics();
physics.ApplyImpulse("0 500 0");

Nothing happens when player is still. However if i walk forward and call this, it does work.

tawny lotus
open pier
minor agate
#

Dont add the enumlinear yourself

amber moat
meager drum
red cedar
#

@meager drum

#

Just noticed this example doesn't include how to get the data, this is how i do it

private void ConnectUserOnSuccess(RestCallback cb)
    {
        LogBackend("SDS_ConnectUserCallBack.ConnectUserOnSuccess " + cb.GetHttpCode());
        
        SDS_ConnectUserResponseJson response = new SDS_ConnectUserResponseJson();
        response.ExpandFromRAW(cb.GetData());
}
amber moat
#

yes i sent it in private didnt want to clutter here but thats correct!

#

// 2. The component — attach this to your GameMode entity in Workbench
class MyWebhookComponent : SCR_BaseGameModeComponent
{
protected static const string WEBHOOK_URL = "https://your-server.com/";
protected ref MyWebhookCallback m_Callback = new MyWebhookCallback();

override void OnPostInit(IEntity owner)
{
    super.OnPostInit(owner);
    // Hook the event you want — this one fires on player kill
    SCR_BaseGameMode gameMode = SCR_BaseGameMode.Cast(owner);
    if (gameMode)
        gameMode.GetOnPlayerKilled().Insert(OnPlayerKilled);
}

protected void OnPlayerKilled(int playerId, IEntity player, IEntity killer, notnull Instigator instigator)
{
    string payload = "{"event":"player_killed","playerId":"" + playerId.ToString() + ""}";
    RestContext ctx = GetGame().GetRestApi().GetContext(WEBHOOK_URL);
    if (ctx)
        ctx.POST(m_Callback, "/webhook", payload);
}

}

red cedar
amber moat
#

lol sorry hahaha

ocean kernel
#

scr_jsonsavecontext and scr_jsonloadcontext

ocean kernel
#

What does placing an entity as game master do differently to its flags as opposed to spawning it with spawnentityprefab?

#

I have some stuff in EOnFrame that runs serverside that moves an entity around and it only works after spawning via GM, not via SpawnEntityPrefab, even though I set the frame flags on init

ocean kernel
#

ok figured it out, next question - why is standing on a vehicle resetting scale of a character entity and where can I turn that off

#

also, in game master the NON_INTERACTIVE editable entity label does not prevent me from dragging it around, unlike before 1.6.0

#

did a different label replace it?

minor agate
ocean kernel
#

If scaling is not supported then why is it actively being set when standing on vehicles?

minor agate
#

Scale not supported means that custom scales are not expected

#

Not that scaling does not work in engine

#

On many logic we have, for the sake of performance and even sometimes lack of knowledge of the developer that worked on it, the 3D math there either expect orthonormal matrices or has math that does not take into account scaling at all and thus either breaks or resets it to 1.

ocean kernel
#

Okay, how do I make the entity ignored by the Make Changes To Entity When Standing On Vehicle function?

#

Just exclude it from that system altogether

#

Also where is the script responsible for selecting entities in game master? selection ui component doesnt actually select entities

#

Oh it sorta does, but ignores entities that are flagged NON_INTERACTIVE

#

This is because NON_INTERACTIVE flag in Reforger means actually interactive but sometimes not

#

I need a way to make it not possible to move an entity around in GM (can select it, use context actions, but not move it around)

#

When this is set to No Value, it still spawns a group for the character

#

Expectation: When set to None, result is None

ocean kernel
minor agate
#

I am not sure anyone that worked in GM is active in the discord as well

#

I will ask internally and try to find out

clever marlin
#

Boy we would to have some them guys around here

restive island
#

There is one .conf file that lists all the structures a GM can spawn (and player built, and HQ) but I can't remember its name. There's also the array in EditorModeEdit.et > SCR_PlacingEditorComponent that GM also calls.

coarse pasture
#

I’ll take a look tonight

restive island
quiet glade
#

Is the OFPEC tag still relevant?

ocean kernel
torn bane
ocean kernel
#

They cannot be moved, they can be deleted or given waypoints or other actions

#

I feel like this is what NON_INTERACTIVE flag did before 1.6.0

#

Alternatively since those are compartment occupants maybe something in the compartment to prevent yeeting out crew

candid garnet
#

do we have a class similar to deque from python? if not, could we possibly get one?

static vale
#

Asking this again as i can't find a solution other then TPing the player slightly in the air which isn't great.
How can i apply physics impulse to a player while they are standing still? It seems like applying an impulse only works while the player's velocity is greater then zero?

Physics physics = player.GetPhysics();
physics.ApplyImpulse("0 500 0");

Nothing happens when player is still. However if i walk forward and call this, it does work.

quiet glade
#

Are there like tutorials to make server mods only?

elder ocean
#

Hi everyone,
Do you know if a mod exist to make possible to communicate in game via open mic ?
Without to have to double T for exemple.
More like TFAR in Arma 3, constant open mic for instant communication via voip, thanks guys !

river imp
# static vale Asking this again as i can't find a solution other then TPing the player slightl...

The "description" of the class says
"Two main types of physics bodies are static and dynamic. Static bodies are represented
by a collision object and dynamic bodies by a rigid body. This means certain methods make sense only when dealing with
a dynamic physics body, e.g., Physics.GetVelocity, Physics.ApplyImpulse."

Which leads me to believe that those examples should only work with dynamic bodies. Which the character isn't. It has no Rigidbody and IsDynamic returns false. I can confirm that the velocity being greater than zero does allow it to work though, which could be unintended?

#

I only tested from remote console but you can call CharacterControllerComponent.SetJump and then apply the impulse.

#

The lowest value it seems to work with is 5.

tawny lotus
#

Eventually a class may grow in size (2000+ lines) and it makes sense to split it in to separate files. I would like to keep the functionality inside the class, but for example move getters/setters to another file. What is the recommended way to do it?

river imp
#

I would just mod the class.

torn bane
quiet glade
#

Because I have seen videos that somebody created some scripting and dragged it into the “world” so I thought that’s not needed for a server mod

tawny lotus
# river imp I would just mod the class.

File1:

..stuff..
DoNewStuff()
}```
File2:
```modded class MyClass{
..more stuff..
void DoNewStuff()
}```
This gives me errors that file1 can not find a new function defined in file2.
river imp
tawny lotus
river imp
#
//CustomClass.c
class CustomThing
{
    int m_Value = 12;
    
    void Add(int Add)
    {
        m_Value += Add;
    }
}
//CustomClass1.c
modded class CustomThing
{
    int GetValue()
    {
        return m_Value;
    }
}
#

This works.

#

In the same folder

tawny lotus
#

... sorry, made a mistake .. re-testing.

minor agate
river imp
#

Spit it out Mario lol

minor agate
#

Order does not matter when you have original class and modded class

#

Modded classes get hoisted

river imp
#

Something weird happens sometimes.

#

I've had the issue that he's currently having before.

minor agate
#

Recompile on host probably broke if you used that

#

I think I recall a problem where if you changed signature of the method at some point, it could get messed up

#

But i was never able to repro that myself, I just saw reports a long time ago

#

But that is how it works

#

Modded get added to a queue of sorts

#

and processed after

river imp
#

Yeah it seems to work fine now.

#

og script in Z and modded classes in A

#

and it still works just find.

#

fine*

#

I think you may be trying to call some functions in "unmodded" class that exist in the modded class?

tawny lotus
#

That is exactly the problem.

river imp
#

Yeah you can't do that.

tawny lotus
river imp
#

The function doesn't exist

#

You can't call a function that doesn't exist llo

tawny lotus
#

Is there any way to go around this?

minor agate
#

When you do this

river imp
minor agate
#
class SomeClass;
modded class SomeClass;
modded class SomeClass;
modded class SomeClass;

What happens is that you create derived classes.
It ends up like this

class SomeClass#1#0;
class SomeClass#1#1 : SomeClass#1#0;
class SomeClass#1#2 : SomeClass#1#1;
class SomeClass : SomeClass#1#2;
#

It create new classes and renames them

#

and ties them with inheritance this way and makes the last modded one to be named as the original

river imp
#

If you're specifically trying to call the "external" getters, just get the variable directly instead.

minor agate
#

So if the previous one had no access to some method added later, then it won't compile

tawny lotus
#

All this makes sense. I'll just add a stub in the original class and have moved functions as override in the modded class.

static vale
# river imp The lowest value it seems to work with is 5.

So next thing would be is I plan to ragdoll that character then apply an impulse. Which behaves in the same way(so your solution works). The ragdoll is almost certainly a dynamic rigid-body right? Perhaps there is special way to get said ragdoll body?

ocean kernel
#

Anyone know a way to prevent a character from being able to be moved or removed from a vehicle? By a game master

dire sinew
ocean kernel
#

There is also parent entity changed or something

minor agate
#

Call this method SetEntityFlag

#

And set EEditableEntityFlag.NON_INTERACTIVE I guess

#

Or search for where this is read, and target some specific condition of yours

#

Ah but that is the thing you mention is broken

#

@ocean kernel I think I see the specific commit that broke this

#

I will discuss internally with the dev that changed it

#

Short story short

#

They tried to fix a bug and introduced another one, the one you are facing

#

Now time to go to sleep meowsweats

restive island
boreal swan
#

How does one define an interface? Wiki mentions it briefly but I'm not sure about the syntax

pliant ingot
boreal swan
#

Are there any plans to add actual interfaces at some point? I think it would be very handy to have an option for a class to implement multiple interfaces 😛

ocean kernel
minor agate
minor agate
ocean kernel
#

In general it's a expectation vs reality thing just very confusing. I doubt a lot of modders rely on this specific thing, but things not doing what you'd expect them to can be frustrating

ocean kernel
#

Providing those fixes in a format where they can be implemented to only function inside the relevant mods would help me get my stuff moving forward without impacting anyone else

minor agate
#

Sometimes we are really locked by release process, so in those cases it can be useful

restive island
candid garnet
static vale
#

@minor agate Is there no way to apply impulse to an idle player/ragdoll of a player? One would think that the player ragdoll is a dynamic body so impulse should work? Perhaps I'm not getting the ragdoll properly? Appreciate the help.

        cc.RefreshRagdoll(1);
        cc.Ragdoll();
        physics.ApplyImpulse("0 1000 0");
river imp
#

I could be wrong but, I'm pretty sure some comment somewhere indicates such.

static vale
quiet glade
#

Does somebody want to review my script? As return favor I can review a PHP script for you (since thats my expertise 😂 )

ocean kernel
static vale
ocean kernel
#

Sorry going off memory

static vale
#
    //! Adds damage effectors that will be applied to ragdoll once it is enabled.
    //! @param posLS Position in character's local space.
    //! @param dirLS Normalized direction in character's local space.
    //! @param force Force in m/kg3
    //! @param maxLifeTime Duration in seconds during which this damage is applied (scales with reduction).
    //! Call this only on the server. Replication to the owning client is handled in game code. Remote proxy clients do not need this information, as the ragdoll initialization state is replicated to them when they enter ragdoll.
    proto external void AddRagdollEffectorDamage(vector posLS, vector dirLS, float force, float radius, float maxLifeTime);
ocean kernel
static vale
ocean kernel
#

Banana Peel Mine, broken in 1.6 though, you can download it but wont be able to run it

#

But the strategy is apply ragdoll effects and then set character unconscious.

static vale
#

also i don't have an issue with applying forces while moving. It's only an issue when the character is idle

static vale
#

Alright this works!! Thank you!

minor agate
#

So you need to update both

#

If we fracture like that, it would also possibly cause modders to publish mods that work in WB but not in actual game

minor agate
minor agate
#

A bug in WB not showing in Game is just due to developer features enabled in WB, and some caching done on the embedded Game within workbench.

#

But it is the same code, same data

#

What I meant is that we are not doing WB (With newer Enfusion for example) when Game package is older version

open pier
#

I think my problem when it comes to works in WB but not ingame is understanding client v server. WB runs both so ofc everything will work. But trying to use the peer tool or the DS through workbench to get stuff working, it still then doesn't work ingame sometimes.

restive island
minor agate
tawny lotus
ocean kernel
red cedar
lean moth
brazen sphinx
ocean kernel
minor agate
#

We can't tell you anything about A4 until the roadmap for it is released when it comes to it's design

restive island
#

New WorkBench Plugins

plucky field
#

alright tho who here is doing mod work on not conflict but combat ops script work cause thaty shit been stumping my ass lately

solid hearth
#

A4 Roadmap: hope to make something that works smug_cat

ocean kernel
#

In a vehicle with multiple turrets and spawn occupants enabled, in MP some characters that are spawned in the turrets are just stuck in mid air for the client, wtf

tawny lotus
#

Happens sometimes with normal vehicles too. Don't know how to properly repro so it's hard report.

ocean kernel
#

I cant repro in peertool but can repro in dedicated server

#

I tried inflating my ping to 500 with peertool, doesnt seem to be a race condition

#

but who knows

tawny lotus
#

I guess (bet?) if you would have multiple clients to look at the same spot, they will see different things. Some replication issue (on BI end)?

wintry sable
#

Where can I get list of all the available actions like CharacterRight, *CharacterForward * etc ? I'm looking for direction change and roll actions in particular

pliant ingot
quiet glade
#

How to I get the level name in the override void OnGameStart() ?

torn bane
shrewd nova
#

Did the base game stuff for turrets get modified to recognize more than one turret, or is it some kind of vanilla override on the original turret stuff to add more

#

Before 1.6 nobody I know could get more than 1 gunner seat to work at a time (excluding btr)

#

Any extra turrets would result in broken anims

ocean kernel
shrewd nova
#

I think the main issue is the anim graph variables are the same , so when you add a new turret to the entity by slot or compartment there no way for the entity to know what anim goes where

#

With hierarchy that shouldn’t break

torn bane
modest nebula
#

Is GameSystem concept documented somewhere or are there any great threads/messages in Discord that goes trough what their purpose is and when I should make a GameSystem?

quiet glade
#

Is there a way to do http requests to a web server but more advanced?

https://community.bistudio.com/wiki/Arma_Reforger:REST_API_Usage
The REST API is only meant to provide basic REST functionality (GET and POST methods - see HTTP request methods), not full server functionality (like e.g curl).
Data size accepted by the API has to be below 1 MB
There is no support for custom headers
There is limited printout

torn bane
quiet glade
#

So the documentation is not up-to-date?

torn bane
#

Correct

quiet glade
#

Thanks, will try!

quiet glade
torn bane
#

except for the leading space there, yes

modest nebula
ocean kernel
#

Is there a component that automatically lerps entity transform changes in MP?

dire sinew
ocean kernel
#

I know that this doesnt lerp

#

I can see the stutter of the entity in MP as client

#

It might be for actual movement, not just a transform change

dire sinew
#

You can't just set transforms. It needs a velocity such that it can do predictions in the first place.

#

Ultimately, you probably want to model some trajectory, so just knowing the positions is not enough for making it smooth. Or what is your actual use case?

quiet glade
#

Can I simulate a player killed event in the script editor?

dire sinew
dire sinew
#

I mean just for testing the override, you could run MpTest.ent and call the Kill method on the damage manager.

quiet glade
#

Because I'm creating a script that send game events to my webserver, so now I do publish to workshop, restart server and try to replicate an event (OnPlayerRegistered and OnGameStart is easy to test) but the feedback loop is horrible xD

dire sinew
#

Horrible indeed. Why don't you test with play mode in world editor first?

ocean kernel
dire sinew
#

And once you got it working there, you can use the dedicated server tool in the world editor for testing MP.

dire sinew
ocean kernel
#

Its better after replacing it with the NwkPhysicsMovementComponent, thank you

fading heron
#

Can someone tell me what I need to create dynamic markers or provide an example code snippet?

quiet glade
#

So an other question, if I do a git init in the folder where my addon is, will this also be published to the workshop?

dire sinew
dire sinew
# quiet glade Well, I'm new to this so I didn't try that yet, I will see if I can figure that ...

Then you may want to have a look at the tutorial series: https://www.youtube.com/watch?v=Fgl_mAHReP4&list=PLfUcrRpCM_fKjkTrkV-bqnknVbFCPA3YU

https://reforger.armaplatform.com/news/modding-boot-camps-introduction

This Modding Boot Camp seminar was originally held on the Arma Discord Server on November 20th, 2024.

Join Modding Supervisor Mario Enríquez for our first Modding Boot Camp, where he gives a quick overview of the Arma Reforger Tools and Workbench.

00:00 - Modding Boot Cam...

▶ Play video
#

The replication ones should also show how to use the dedicated server tool.

quiet glade
#

I try to watch that tho, but to much stuff was irrelevant for what I wanted to do

#

Why I can override OnPlayerConnected but not OnPlayerDisconnected?

#

I see OnPlayerDisconnected is protected but I don't understand why and how to find the alternative

#

Whoops, nvm, I looked wrong, I can override this

quiet glade
#

Yea I did an override with to less arguments and than it says I was not allowed to override, so after adding all the arguments it was ok 😂

red cedar
#

also are you using a modded class or extending it ?

#

😭

#

nice lol

quiet glade
#

modded class SCR_BaseGameMode

red cedar
quiet glade
#

Oh cool, in PHP you can only override public or protected stuff 🙂

red cedar
#

That would be the case with normal inheritance too

#

But the modded keyword means "hey i want to toy with things that don't belong to me and that weren't meant for me to touch"

quiet glade
#

Yea it is a bit tricky tho, would prefer to have events and create subscribers/listeners for that xD

red cedar
#

you'll get used to it and eventually (i'm assuming you're kinda new to scripting) when you will want to alter with the way vanilla thing works it will be really useful

#

but i get that

quiet glade
#

But I can imagine when you have a game engine you want to be more flexible 🙂

red cedar
#

also they did create an event system, we'll soon see it in AR and it should be fully integrated in arma 4

quiet glade
#

I have 15 year experience as PHP developer, but I'm new to Enfusion and c etc 🙂

#

Ah cool!

#

But I really like to play with this stuff, I created an eventsourced web application to store all those events

#

So now In the right bar you see the game server has sent those 2 events to my web server 😄 (I'm happy that I managed to make this work 😂 )

#

So my idea is you can have general server stats, and not only per round etc 😄

red cedar
#

oh i've done a few similar things that's cool

#

i like the timeline events

#

kinda neat

open pier
#
private void SendKillInformationToBackend(RGG_KillInformationJson killInfo)
    {
        SCR_JsonSaveContext saveContext = new SCR_JsonSaveContext();
        saveContext.WriteValue("", killInfo);
        string data = saveContext.ExportToString();
        string uri = "kill?serverId="+m_ServerId;

        m_RestContext.SetHeaders("X-AUTH-TOKEN,"+m_ApiKey);
        m_RestContext.POST(m_KillInfoCallback, uri, "content="+data);
                
    }

my method to sending kill information. This is called in the OnPlayerKilled function on a GameModeComponent

#

and a snippet from my staff panel where this ends up getting used

quiet glade
#

Ah cool!

#

My idea was to make my site public where you can register your server and install the addon

#

No idea performance wise how strong the webserver should be, but problems for later 😂

open pier
red cedar
quiet glade
#

ah ok nice, I was also thinking to group events to not overload the webserver but thats for later 😛

open pier
red cedar
open pier
#

RGG is framework name scheme for Badlands, i use GSE_ for purely my scripts/mods

quiet glade
#

Whats that? a tutorial or something?

red cedar
open pier
red cedar
#

really cool guy

#

he taught me how to script

quiet glade
#

Ah check

red cedar
quiet glade
#

I tried to find good tutorials but its hard to find something that related to what I want

#

Because you can do so much in this engine

red cedar
#

that's how most of us learned

open pier
#

docs taught me the why, searching up relatable functions taught me the how

quiet glade
#

I tried AI to guide me a bit, but they mix arma 3, dayz etc to write code for reforger 😂

open pier
red cedar
open pier
#

Once you do start writing code, it gets repeatable depending what you want to do like setting up controllers for managing different functionalities of the game. More than likely can copy and paste your first one, then change whats needed to make the 2nd.

woohoo the spam bots made it here too, just got rid of one in our discord ;-;

red cedar
#

(bc he wasn't)

quiet glade
#

I wanna learn that api struct too 😛

open pier
red cedar
#

Api struct

class SDS_KillInfoJson : JsonApiStruct
{
    // Attributes
    string victim_uid;
    string killer_uid;
    
    bool is_friendly_fire;
    
    string killer_weapon_guid;
    string killer_weapon_name;
    
    string victim_weapon_guid;
    string victim_weapon_name;
    
    string killer_pos;
    string victim_pos;
    float kill_distance;
    
    string victim_faction_id;
    string killer_faction_id;
    
    string hit_bodypart;
    
    
    void SDS_KillInfoJson() // Constructor
    {
        RegAll();
    }
}
open pier
#

yeah im doing it manually outchea

class RGG_KillInformationJson : JsonApiStruct
{
    string m_sVictimPersistenceID;
    string m_sVictimPlayerName;
    vector m_vVictimLocation[4];
    string m_sVictimWeapon;
    
    string m_sKillerPersistenceID;
    string m_sKillerPlayerName;
    vector m_vKillerLocation[4];
    string m_sKillerWeapon;
    
    float m_fKillDistance;
    
    void RGG_KillInformationJson()
    {
        RegV("m_sVictimPersistenceID");
        RegV("m_sVictimPlayerName");
        RegV("m_vVictimLocation");
        RegV("m_sVictimWeapon");
        
        
        RegV("m_sKillerPersistenceID");
        RegV("m_sKillerPlayerName");
        RegV("m_vKillerLocation");
        RegV("m_sKillerWeapon");
        
        RegV("m_fKillDistance");
    }
    
    void ~RGG_KillInformationJson()
    {
    }
}
#

I'll keep in mind the RegV big time though, annoying doing all that repetitive work

red cedar
#

usage :

SDS_KillInfoJson killInfo = new SDS_KillInfoJson();
        // Profile
        killInfo.killer_uid = KE_Helper.GetPlayerUID(instigator.GetInstigatorPlayerID());
        killInfo.victim_uid = KE_Helper.GetPlayerUID(victimId);
// other attributes

        m_backend.AddKill(killInfo);
    void AddKill(notnull SDS_KillInfoJson killinfo)
    {
        if(!m_isBackendReady)    {return;}
        
        killinfo.Pack();
        m_context.POST(m_addKillCallback, m_endpointConfig.m_addKillEndpoint, killinfo.AsString());
    }
open pier
#

what does the killinfo.Pack(); do?

red cedar
open pier
#

ahh gotcha

red cedar
#

i had the issue once but i wonder the tostring does it for you ?

open pier
#

yeah ive never had a problem with the ExportToString, its how it Sen was doing it when i set this up

tawny lotus
#

I would like to assign waypoints to a non-AI entity like a car. In GM, I want to click on this entity and then have the waypoint list on lower part of the screen (move, force move, ...). How could I achieve this?
Put an invisible AI group on the entity?

clever oxide
#

better if you generate waypoint later or add to group when unit get in the car, use get in event

tawny lotus
ocean kernel
#

Waypoints are just entities that are called waypoints

#

But yes the waypoint toolbar shows up when you have groups selected

#

You CAN have empty groups

#

But then you are in charge of moving the GM group indicator since there's no group leader

sweet badger
misty island
#

Is there any decent net logger of sorts to get a full picture of the RPL componenets activity in the diag menu?

quiet glade
#

When a player is connected I get a player id thats only exists on this server, is there an option to get the Bohemia/Steam ID so I can track stats over servers?

torn bane
tawny lotus
#

If an entity spawned by server wants to despawn itself (in ScriptComponent), what is the right way to do it?

ocean kernel
#

Anyone had experienced ApplyTorque randomly applying 10x the torque that you ask it to? No clue why it happens but sometimes the entity just jumps 3458349534 degrees but higher torque is not being applied. turns out it was colliding with an entity inside its own hierarchy which is no longer happening after checking merge physics but now the blocker is entire workbench crashes without crash report when exiting play mode

minor agate
ocean kernel
#

Idk will need to see how much time itd take to make a specific repro

minor agate
#

And tell him just how to repro it from there

ocean kernel
#

If I cant find a workaround I will

minor agate
# ocean kernel If I cant find a workaround I will

Ok, if you need help anyway feel free. (MIght throw him under the bus here haha) but unlike other programmers, he is hired to dive into mods like this and help find solutions for modders or fix problems on our side.

clever oxide
late locust
#

So he can make 0 mass projectiles with damage a thing again? hmmyes

finite chasm
#

.

ocean kernel
#

idk I feel like mass in projectiles doesnt do anything

late locust
#

Yeah after the rework you cant do anything fun with them 🙁

ocean kernel
#

you can set air drag to 0 but dont use the ballistic table generator as it'll just freeze

steep cliff
static vale
#

Anyone know why ChimeraWorldUtils.TryGetWaterSurface doesn't work on these ponds and arland? Not sure if everon has issues too

eternal drift
#

Is there a reliable way to force stream and activate groups that are far away from the player? It seems the AI are not taking orders unless a game master goes to the location of the AI or a player gets close, then they seem to enable themself.

neon elbow
#

You hate to see a good person get hacked 🙁

inland bronze
#

Is there a simple way to a get a random position within a shape entity like a polyline?

dire sinew
inland bronze
dire sinew
#

In COE2, I saved a scan of the terrain with 1m x 1m cells with the information on whether they are flat and empty. Then when an AO gets created, I pick the cells that are in the polygon and the sample from them. That has the advantage that I know from the start whether it is possible to find a suitable cell in the first place.

pliant ingot
#

Why Test Framework is not printing reason to normal log, but only to junit?

#

Because of this, "open autolog.txt" just open empty file (contains only "Line1: Begin Line2: End")

serene yew
pliant ingot
# serene yew Test Framework (enf) or Autotest Framework (scripted, ar)? in case of Autotest F...

That available by F4 in script editor:

class MyTestSuite : SCR_AutotestSuiteBase {};

[Test("MyTestSuite")]
TestResultBase f() {
    return SCR_AutotestResult.AsFailure("Reason %1 %2", "1", "2");
};

Just prints to autolog.log:

16:55:18 
16:55:18 ############################################/
16:55:18 TestSuite #MyTestSuite started
16:55:21 /############################################
16:55:21 

to console.log:

SCRIPT       : ############################################/
SCRIPT       : TestSuite #MyTestSuite started
    some vanilla warnings
SCRIPT       : /############################################
SCRIPT       : SCR_TestRunner has finished running
SCRIPT       : Autotest JUnit XML saved to: $logs:/junit.xml
SCRIPT       : Autotest failed list saved to: $logs:/autotest_failed.log

and to autotest_failed.log:

f

So, only junit.xml contains reason:

<testsuite name="MyTestSuite" tests="1">
  <testcase classname="MyTestSuite" name="f" >
    <failure type="Result">Reason 1 2</failure>
  </testcase>
</testsuite>
serene yew
pliant ingot
ocean kernel
#
SCRIPT    (W): 'BaseCompartmentSlot' Trying to spawn character in compartment but it could not be moved into it so character is deleted. Compartment type: PILOT

Useless error: I can see the character is missing. Tell me WHY they could not be moved into it. Geez.

tawny lotus
ocean kernel
#

It's a fake door too

tawny lotus
ocean kernel
#

Doesnt work with Scene_Root still

fringe prairie
#

Noticed that defines in my project do not stick when editing them in the editor, hmmm. Only PS5 sticks and shows the typical "bold" text showing that a property was overwritten/edited.

uneven oriole
#

Can BTVariable Handle Array?

#
 WORLD        : Frame
  AI        (W): AI/BehaviorTrees/Chimera/Soldier/DCO_FindMagazineInGround.bt -> SCR_AI Get Current Magazine Prefab -> SetVariableOut(MagWellArray) - output variable type mismatch```

I Already use .type()
#

array<typename> magazineWell = {};

magazineWell.Insert(a.GetMagazineWell().Type());

sour prawn
#

How can I hook the Helicopter Engine RPM if i want to change it in game ? pls

torn bane
sour prawn
sour prawn
#

the thing is that i can"t find anything in the game scripts the VehicleHelicopterSim component is in read only i think and i'm a little bit lost

torn bane
#

You could try using VehicleHelicopterSimulation.SetThrottle()

sour prawn
torn bane
#

Yes, because the simulation is running and without player input the throttle is put back to 0

#

The helis are not designed to be operated by script

#

i would just let the player control the throttle as normal and sync the animation, so when they give collective thrust the lever just moves

sour prawn
torn bane
#

I do not think so

sour prawn
# torn bane I do not think so

Ok thank you for your help I appreciate it a lot. Could I eventually DM you or @ if I had any more questions regarding the Game Engine pls

torn bane
#

No, please ask your questions in the public channels so the relevant people from the dev team can read and answer. i do not know everything nor do i have time for everyone

sour prawn
uneven oriole
#

Is it possible to play Video in Game?

coarse moon
#

How is possible to get that AttachmentSlot name? I'm trying to disable some attachments with another (Not like the obstruction function) and can't find any clue

torn bane
coarse moon
#

The idea is that I have few handguards compatible with the same weapon and when I fit one that doesn’t have Picatinny rails, it doesn’t allow me to attach anything to the Left_Ris slot (for example). The obstruction system doesn’t quite work for this, so I’d prefer to disable the slot by searching for it by the name of the AttachmentSlot

river imp
#

It will require some BaseAttachmentType inheritance though.

#

Psudo-Example

class AttachmentHandGuard_YourWeapon : AttachmentHandGuard{};
class AttachmentHandGuard_HasRail : AttachmentHandGuard_YourWeapon{};
/*
Your Weapon will contain a slot for AttachmentHandGuard_YourWeapon
This will allow any hadguard of type AttachmentHandGuard_YourWeapon to be attached to your weapon.

Your ris attachments will contain SCR_WeaponAttachmentObstructionAttributes with AttachmentHandGuard_HasRail in its m_aRequiredAttachmentTypes array
If your weapon doesn't have a handguard of type AttachmentHandGuard_HasRail then you will be unable to attach it.
*/
#

The same could be done for the handguard that has no rail and you could obstruct the ris slot.

#

Either way works for exactly what you're trying to do.

spark otter
coarse moon
odd berry
#

Anyone able to help me figure this out? I'm trying to add a RHS radio to player's inventory on respawn, I've added the radio in the Loadout_CIV.conf that I'm pretty confident is used on respawn (cause it contains all the same gear as you can respawn with) but the radio doesn't appear in the inventory.

Then I found that there's this snippet from a script that references LoadoutConfigs and JWK_ELoadoutItemPurpose.NAVIGATION which seems to be used for the map in the screenshot but I'm not sure how to override this script so I can add that it also adds items using the JWK_ELoadoutItemPurpose.COMMS category?

if (context.m_bIsPlayer) {
    JWK_LoadoutConfig loadout = JWK.GetResistance().GetLoadoutConfig();
    
    if (JWK.GameSettingsCache().m_bRespawnRebelHandgun) {
        context.m_iWeaponSetType = JWK_ELoadoutWeaponSetType.BASIC;
        ApplyWeaponSetFromConfig(context, loadout);
    }
    
    if (JWK.GameSettingsCache().m_bRespawnRebelMap) {
        context.m_iItemsPurposeInclude = (
            JWK_ELoadoutItemPurpose.NAVIGATION
        );
        ApplyItemsFromConfig(context, loadout);
    }
}
#

I guess I'm asking, how do you override a protected script from another addon so I can apply my own version of it?

late locust
#

Does the CollisionTriggerComponent do anything? Or how do I make e.g a grenade trigger on impact? thonk

ocean kernel
#

I have the biggest jank workaround for making it work in my rubber duckie mod

#

Collision trigger component doesnt work when things collide, well, in some cases it does

#

It should be renamed to Specific entity type collision trigger component

late locust
#

The impact nade mods all have some sub munition projectile that spawns 0.5s after throwing and they collide or something but cant get it to work

late locust
ocean kernel
#

I dont know what the license is but feel free to yoink if it helps you

#

Maybe you can make it betterer

late locust
#

Gotta make everything custom jank workarounds cause the vanilla components just dont work notlikemeow

ocean kernel
#

The funniest thing is those jank workarounds break less than vanilla

late locust
#

Made a simple version of it, works great. Even used LengthSq so no one can complain

fringe prairie
#

Think for collision detection 10 million ray traces every frame should do the trick

ocean kernel
#

One per pixel

sturdy fable
#

Have anyone managed to solve the weird auto exposure thingy? or its just baked into the game engine and theres no point trying to bruteforce with HDR.emat?

fringe prairie
#

f86e2c91-db6a-45e1-a4c2-b14fa49a4625

Can someone help me troubleshoot this issue from hell (experimental 1.7 Tools).

Workbench is crashing upon opening folder with prefabs, minidump points to thumbnail generation being culprit.

#

Interestingly enough, each time it crashes it's post thumbnail generation, so if there are 6 thumbnails, it generates 1, crashes, upon reopening, generates thumbnail 2, crashes, repeat. Once all are generated - doesn't crash.

Also seeing automatic crashes leaving edit mode. I can't provide a minimum reproduction yet, WCS_Armaments needs to be updated to compile if a BI Dev wants to look at the issue themselves.

sharp bone
#

Does anyone know who made the mode evannex

fringe prairie
sharp bone
#

Does anyone see my messages

restive island
#

only if you start singing baby shark

inland bronze
#

Yes, we see your messages, but if someone does not reply, it’s because they may not know the answer to your question

sour prawn
#

Is there a way to add shaking on a vehicle hull

amber moat
uneven oriole
#

wait really?

amber moat
#

Yes

uneven oriole
#

how?

#

can you guide me where to start from?

amber moat
#

I am not at pc right now, but there are already many examples for live video feeds, but if u actually need to play an mp4 for example, like a video clip and show it on a screen, you’ll have to split the clip in frames and then have the audio track synched (I think, I actually never tried this, I only tried sending frames to a web hook, but I remember bacon once explained how he’d do a video in game )

fringe prairie
amber moat
#

Yeah 🤣

uneven oriole
#

Yep, imma scrap the idea now

#

Thanks

amber moat
#

There might be a proper way(?)

river imp
#

Then have it play on an in game TV

uneven oriole
#

I will look at it

amber moat
sharp bone
#

Does anyone know about scripting

river imp
river imp
#

No it won't. You can apply a little force and have 0 issues whatsoever

fading heron
#

Can someone tell me what I need to create dynamic markers on Map or provide an example code snippet?

pliant ingot
sour prawn
#

can I simulate a rotor brake system ? block the rotors from spining even if the engine is on ?

#

or speeding up down the spool down

minor agate
#

Ah, @river imp already explained it 😅

uneven oriole
#

Wait but why it is disabled?

minor agate
#

It was also not required for Arma Reforger, so it was never fully implemented too.

uneven oriole
#

well it does make sense, but are there any chances it will be enabled again?

sharp bone
#

Does anyone use evannex mod

minor agate
#

This is not even a question for Arma Reforger but Arma 3

sharp bone
#

Every one was right it is a rude and non helpful sever

#

And rude one to

minor agate
sharp bone
#

@minor agate ur rude a and disrespectful

#

Ass hole

red cedar
#

Grown ass man btw

minor agate
#

What happened? 😅

#

I was polite

solid hearth
#

Gonna need you to stop being rude and disrespectful worryPensive
(Hilarious btw)

plucky folio
#

Has anyone got any ideas why the bridge prefab when swapped back into it's slot doesn't follow the parent bone pose when picked up?

It works fine in Single Player but not on dedicated servers so I assume It's RPC related but nothing I try is working...

ornate swift
queen silo
ocean kernel
#

There is a flag for entity being visible but not for it becoming not visible

plucky folio
#

Ah wait I could just update the response Index to No Collision

minor agate
minor agate
ocean kernel
#

The only winning move is not to play

uneven oriole
river imp
uneven oriole
#

client then RPC to server

#
{
    override void SetVisible(bool show)
    {
        if (show)
            m_Owner.SetFlags(EntityFlags.VISIBLE | EntityFlags.TRACEABLE);
        else
            m_Owner.ClearFlags(EntityFlags.VISIBLE | EntityFlags.TRACEABLE);
        
        Replication.BumpMe();
    }

}```
river imp
#

What is the object?

uneven oriole
#

Character

#

i modify the herd onelife so its compatible with the dedicated server

#

right now, the spectator camera is working

#

but making the character go invisible

#

i have no clue

river imp
uneven oriole
#

since its only working on singleplayer

river imp
uneven oriole
river imp
river imp
#
modded class SCR_EditableCharacterComponent
{
    //------------------------------------------------------------------------------------------------
    override protected void OnVisibilityChanged()
    {
        super.OnVisibilityChanged();

        if(m_bVisible)
            m_Owner.SetFlags(EntityFlags.VISIBLE | EntityFlags.TRACEABLE);
        else
            m_Owner.ClearFlags(EntityFlags.VISIBLE | EntityFlags.TRACEABLE);        
    }    
    //------------------------------------------------------------------------------------------------    
}
#

That was all I needed to have the character to be set to invisible.

uneven oriole
#

alright i will try it

river imp
#

All you need to do is have the server call

        SCR_EditableCharacterComponent::EnableVisibilityReplication(true);
        SCR_EditableCharacterComponent::SetVisible(false);
long stream
#

Is there a way to choose what can and cant be spawned in the Vehicle Depots and Helipads?

uneven oriole
#

Thanks

uneven oriole
#

well, another problem, when the guy reconnected he remains invisible and untraceable,

is there anyway to check if the player reconnected again? like till the server restart again he will remain spectator

#
    {
        writer.WriteBool(isSpectator);
        if (rplID)
            writer.WriteRplId(rplID);
        return true;
    }

    override bool RplLoad(ScriptBitReader reader)
    {
        reader.ReadBool(isSpectator);
        return true;
    }```
#

i tried using this

#
    {
        myEntity = owner;
        SetEventMask(owner, EntityEvent.FRAME);
    }
    
    override void EOnFrame(IEntity owner, float timeSlice)
    {
        if (isSpectator && !isOnSpectator)
        {
            int playerId = GetGame().GetPlayerManager().GetPlayerIdFromControlledEntity(owner);
            int current = ideathCount.Get(playerId);
            PlayerController pc = FindControllerByEntity(owner);
            if (current > 0)
            {
                SCR_EditableCharacterComponent eCon = SCR_EditableCharacterComponent.Cast(owner.FindComponent(SCR_EditableCharacterComponent));
                eCon.EnableVisibilityReplication(true);
                eCon.SetVisible(false);
                Print("IS VISIBLE? " + eCon.GetVisibleSelf());
                ActivateSpectatorCameras(pc);
            }
        }
    }```
#

and put it like this

uneven oriole
#

Nvm i figure it out

#

Create Managers for this handler

sour prawn
#

ow can I create a scrollable button ?
like i hold f and i scroll with my mouse to adjust the value ?

restive island
#

Whats the feature called that lets you see what classes/functions are calling a specific class/function? Like an execution flow chart?

pliant ingot
restive island
restive island
pliant ingot
sour prawn
pliant ingot
#

Also you can print callstack using Debug class

restive island
restive island
sour prawn
minor agate
minor agate
#

You can just set a breakpoint

ocean kernel
#

Where does DamageEffectEvaluator come from?

#

Specifically

class SCR_FragmentationDamageEffect : SCR_InstantDamageEffect
{
    //------------------------------------------------------------------------------------------------
    protected override void HandleConsequences(SCR_ExtendedDamageManagerComponent dmgManager, DamageEffectEvaluator evaluator)
    {
        super.HandleConsequences(dmgManager, evaluator);

        evaluator.HandleEffectConsequences(this, dmgManager);
    }
}

The evaluator, where does this come from?

#

Since it keeps throwing VMEs at evaluator.HandleEffectConsequences(this, dmgManager);

ocean kernel
#

I found it in SCR_CharacterDamageManagerComponent

static edge
ocean kernel
static edge
open pier
shrewd nova
tired geyser
#

Hi, when I create a camera and change its position, does my playerent also change position? '-'

tired geyser
red cedar
#

I should've read the whole convo

#

Sorry for the ping

restive island
restive island
# minor agate You can just set a breakpoint

I print debug to see when something is getting hit and when without pausing anything, it helps see when something unexpected calls it. +1 reason I was looking for a code exec flowchart

restive island
sour prawn
#

Is there a way to hook LV of vehicle lights to change it with a button ?

sour prawn
river imp
sour prawn
river imp
#

The term "button" is too generic.

#

That could mean numerous different things

sour prawn
#

BRT+ and BRT- button to adjust it

river imp
#

If you want a user action, then create a user action that get the light and then have the user action adjust the lv of the light.

sour prawn
#

I tried to hook everything nothing works for me

river imp
#

Get the vehicle get it's lights. Change lv of the light

sour prawn
river imp
#

Yes and you can get the just like you can get anything else.

#

Get them from wherever they exist

#

I.E. if they are a child on the slot manager, get the slot manager, get the slot the light is attached to

sour prawn
river imp
#

Then get that component.

sour prawn
river imp
#

There is a function that exists to do that.

#

Look at the class and look at the functions it has

#

One of them allows you to change the lv

sour prawn
#

you are not helping me brother, i tried what you said for the past 2 hours

#

also if I look at what RHS did it says for instance : [Attribute("10", UIWidgets.Auto, "Light LV - since BI one isnt accesiable then this one will be used", category : "RHS")]
protected float m_fLV;

#

it's not accessible

river imp
#

Then I guess you need to use RHS as a dependency and use whatever functionality that they used. Which I guess is m_fLV

#

I know that I was able to make blinking lights at some point by changing the lv of the lights

#

So they must have removed the exposed value for that or something

sour prawn
#

that's weird

river imp
#

SetColor(Color color, float LV);

#

That's all i'm seeing now.

river imp
#
Color NewColor = new Color(1.000000, 0.968994, 0.689998, 1.000000);

IEntity Vic = GetGame().FindEntity("Vic");
BaseLightManagerComponent BLMC = BaseLightManagerComponent.Cast(Vic.FindComponent(BaseLightManagerComponent));
LightEntity Headlight1 = LightEntity.Cast(BLMC.FindLight(1).GetLightEntity());
LightEntity Headlight2 = LightEntity.Cast(BLMC.FindLight(2).GetLightEntity());

Headlight1.SetColor(NewColor,20.0);
Headlight2.SetColor(NewColor,20.0);
quiet drift
#

Hello! I have an issue with my reload animation, I spawn an entity of a magazine on a slot, and I destroy that entity later. All with animation events. In the video you can see the weapon obstruction is triggered at the exact moment of the Destroy anim event. It's confirmed by a live debug with the player_main.agr

I guess I have to do something specific when i spawn the entity to avoid this, I tried to change simulation state, disable physics, use some flags... Nothing do the fix, I definitely missed something with the proper way to spawn an entity while avoiding interactions.

red cedar
#

Then idk i don't toy with animations via script sorry

desert escarp
#

Is there anyway to fix SetWorldTransform from resetting an objects scale

#

Even when doing

                childPlane.SetWorldTransform(transform);
                childPlane.SetScale(2);
                childPlane.Update();
                childPlane.OnTransformReset();

The scale is set to 1

#

I can confirm just spawning the prefab in it maintains it scale but the minute I do this the scale resets to 1

desert escarp
# river imp What's the object?

It’s decently jank but a Ww2 asset pack has a C47 not properly scaled.

So I’ve made a parent object at 1 scale that players get in and it has the C47 mesh as a child prefab, essentially just a bare bones prefab with mesh, rpm component and hierarchy.

Teleporting the plane is fine it moves around like it should. But the children never get the rotational updates for some reason. This leads to me having to update the children’s transforms as well which for some reason causes the scale to be set back to 1 even if I explicitly set it to 2.

river imp
#

Why wouldn't you just scale the model in Blender?

desert escarp
#

It’s not my asset pack

river imp
#

You're using a dependency?

desert escarp
#

Yeah hence the super jank solution

river imp
#

I would just find a better asset that I could scale, instead of doing jank.

#

Or contact the creator and ask them to fix the scale?

#

How are these things children?

#

Slot manager component?

#

Or literal child prefabs?

desert escarp
#

Literal child prefabs, anything in slots inherit the scale of the overall prefab. Hence why I couldn’t just make the parent the plane scaled up as then the players inside are also scaled up

river imp
#

Children with a hierarchy component should follow the parent

desert escarp
#

They do but not the rotation for some reason. Thinking on that I could maybe get away with setting the angles on the children and maybe that won’t update the scale

river imp
#

Or attach them via a slot manager and use a custom slot type that sets the scale correctly on attach

#

And yes that works.

fringe prairie
#

you could also do some jankishness with the entity type, make your own that enforces what you want at the entity level

river imp
#

I did it with the "ghillie wrap" of the m21 to get it to work with a turret barrel.

#

My method is the least jank.

#

I would just find my own C47 model and cut all the jank out completely

#

If it's not worth doing right it kinda isn't worth doing if you ask me.

clever marlin
#

yea

fringe prairie
#

Figuring out problems like that is helpful though lol. IIRC there have been a couple posts in here about scaling prefabs/entities that could help via discord search.

ocean kernel
#

Lol I read scale I already know someone's suffering

#

I had to write a hitbox system for a scaled character

#

But when said character gets on top of a vehicle, scale goes back to 1

odd berry
#

I don't understand, why does this:

string printline = "[VehicleLimiter] RECONCILED: " + GetEntryDisplayName(entry)
    + " (" + (live + pending) + "/" + maxCount
    + ", live=" + live + ", pending=" + pending + ")";

if (updated)
    printline += " UPDATED";

Print(printline, LogLevel.NORMAL);

Print this:

    SCRIPT       : string printline = '[VehicleLimiter] RECONCILED: LAV (1/1, live=1, pending=0) UPDATED'
    SCRIPT       : string printline = '[VehicleLimiter] RECONCILED: BMP (1/1, live=1, pending=0) UPDATED'
    SCRIPT       : string printline = '[VehicleLimiter] RECONCILED: M1A1 (0/1, live=0, pending=0)'
    SCRIPT       : string printline = '[VehicleLimiter] RECONCILED: T72 (0/1, live=0, pending=0)'
    SCRIPT       : string printline = '[VehicleLimiter] RECONCILED: AH6M_US (0/1, live=0, pending=0)'
    SCRIPT       : string printline = '[VehicleLimiter] RECONCILED: AH6M_RU (0/1, live=0, pending=0)

When it should've been:

    SCRIPT       : [VehicleLimiter] RECONCILED: LAV (1/1, live=1, pending=0) UPDATED
    SCRIPT       : [VehicleLimiter] RECONCILED: BMP (1/1, live=1, pending=0) UPDATED
    SCRIPT       : [VehicleLimiter] RECONCILED: M1A1 (0/1, live=0, pending=0)
    SCRIPT       : [VehicleLimiter] RECONCILED: T72 (0/1, live=0, pending=0)
    SCRIPT       : [VehicleLimiter] RECONCILED: AH6M_US (0/1, live=0, pending=0)
    SCRIPT       : [VehicleLimiter] RECONCILED: AH6M_RU (0/1, live=0, pending=0)
minor agate
#

You can do

Print((string)printline, LogLevel.NORMAL);
#

And it will do what you want

#

or just use

string printline = "[VehicleLimiter] RECONCILED: %1 (%2/%3, live=%4, pending=%5)";

if (updated)
    printline += " UPDATED";

PrintFormat(printline, GetEntryDisplayName(entry), (live + pending), maxCount, live, pending, level : LogLevel.NORMAL);

odd berry
granite chasm
#

But that’s cool tho

sage meteor
#

Anyone know what might cause these vehicle ghosts on clients when deleting them?
It seems rather random whether it occurs or not

    //------------------------------------------------------------------------------------------------
    //!
    void OnSpawn(IEntity entity)
    {
        if (RplSession.Mode() == RplMode.Client)
            return;

        EventHandlerManagerComponent eventHandlerManager = EventHandlerManagerComponent.Cast(entity.FindComponent(EventHandlerManagerComponent));
        if (eventHandlerManager)
        {
            eventHandlerManager.RegisterScriptHandler("OnDestroyed", this, OnSpawnedEntityDestroyed);
        }

        m_bSpawnQueued = false;
    }

    //------------------------------------------------------------------------------------------------
    //!
    void OnSpawnedEntityDestroyed(IEntity entity)
    {
        if (RplSession.Mode() == RplMode.Client)
            return;

        // If the vehicle was destroyed near its own spawn point, delete the wreck
        if (entity && vector.Distance(entity.GetOrigin(), m_Owner.GetOrigin()) < MIN_DISTANCE)
            SCR_EntityHelper.DeleteEntityAndChildren(entity);

        m_SpawnedEntity = null;
    }
winter jay
sage meteor
#

Thanks, will give that a try

sage meteor
granite tendon
#

when I restart scenario from my mod, missionHeader from config.json is not loaded. does anyone know if it will be fixed?

clever oxide
#

is it real or only false info from log?
like this:
12:38:05.687 BACKEND : Loading dedicated server config.
12:38:05.687 RESOURCES : GetResourceObject @"{28DB635B47789055}Missions/MissionHeader.conf"
12:38:05.687 RESOURCES (E): Failed to open
12:38:05.687 RESOURCES (E): MissionHeader::ReadMissionHeader cannot load the resource 'Missions/MissionHeader.conf'!

torn bane
clever oxide
#

i see this in my all DS logs but nothing error... runs for years, all mission header overrides with extra variables works fine

quiet glade
#

I want to post an event to my webserver when the server started with the map name, but how to I get the correct map name? Because I don't understand how arma reforger shows this in the server browser, looks like {gameMode} - {mapName} but how to get that?

#

Server browser says "Conflict - Everon" but what I get is:

{
  "occurredAt": "1775480545",
  "eventType": "round_started",
  "mapName": "CTI Campaign Eden",
  "gameMode": "SCR_GameModeCampaign"
}
sour marten
#

is it possible to make a new line

m_wMessage.SetText "text1" \n "text 2"
its a scripted text

its for a layout where i update the text from a textWidget

dire sinew
delicate edge
#

Has anyone had any luck with disabling street lights using a script? I want to simulate power outage

coarse bane
#

try to disable lamp component by script

deep bolt
#

'having a hard time to get my PVL script working correctly.

the script is a limiter on Attack Hellis, Tanks, Troop Carriers,

but when the limit is reached lets say on Attack hellis

Limit is 2 and the third will be deleted. thhat all fine but the issue is that it triggers the vanilla 300 sec cooldown.

that i dont want as i want only msg be display that the slots are full . so they can go directly spawn somehting ellse that does not have limiter.

soo do anyone have any suggestion wher i should look to make a workaround.

i have some ides but trying to figure out how to is the hard part

  1. Vanilla limiter activates on player but my script deletes the cooldown if a limited unit was spawned .
  2. Vanilla limiter is will not activate at all when , Limited Vehicles are gettign spawned.
#

so anny suggestions ?

red escarp
#

Hey, I’m working on a handcuff system. The item is in a slot from the start, hidden by default. I tried showing it with a button or via animation, but with RPC it only appears for the police officer—other players don’t see it.

Does anyone know how to make a slot item visible for everyone or properly spawn it via animation with full sync?

dire sinew
ocean kernel
#

Is placement cooldown still clientside? High ping + ctrl = vehicle spam

dire sinew
fringe prairie
open pier
fringe prairie
#

Yeah, switched to a hetzner box, self hosted redis+mongo, seems to handle 60rps fine, for now

open pier
fringe prairie
#

The data is relatively tiny, only ~12KB sent every 5 seconds to the API, but with each server that connects to it, means more concurrency across different servers.

open pier
winter jay
#

which mod i can use as example,
that use chat intercept?
like user write !help then script launches?

sour prawn
#

forgot the name

sonic forum
red cedar
#

Tho it will start with # as the prefix

winter jay
#

my vibecoding mod won't work because
i loaded previous packed version from workshop,
instead of unpacked which under development🥹

fringe prairie
#

My understanding of helicopters/vehicles is this:

When a player enters it, the server gives ownership to the player

This seems to work fine

however if the player exits, when they check rplComponent.isOwner() - they still see true
The server sees IsOwner as true as well.
(Testing on a live server)

So how to know who is the owner of a helicopter?

Not sure if this is a bug or skill issue...

red cedar
open pier
open pier
#

Def recommend just reading qhat you can from workbench scripts that relate to what you need. Docs may or may not be up to date but they are just as useful even if they aren't if you're new to this.

red cedar
#

the LLM enjoyers kinda ruined my will to keep modding the game ngl

open pier
#

Non vibe coders will always prevail though. Imagine asking ai for something, then having to rewrite all of it anyways. Just cut out the middleman pepegamer24

lean moth
open pier
#

Enfusion script is easier than python once you learn it imo

lean moth
winter jay
#

llm is just like googling or using search in discord without waiting someone to answer, just waiting gpu answer
litterally

#

don't answer me guys, its waste of time, no need to spam this channel xD

minor agate
#

@winter jay you are not allowed to distribute our code as is. Its against eula

winter jay
minor agate
#

I deleted your message

winter jay
#

copy

minor agate
#

Also

red cedar
minor agate
#

This includes feeding it into ai

#

Its not allowed to train ai on our codebase

open pier
minor agate
#

Just in case you wanted to do it for that

red cedar
#

(pls ban AI code from the workshop 🙏)

#

cough cough

minor agate
fringe prairie
red cedar
lean moth
winter jay
#

..roger that

red cedar
#

but i won't be arguing that

#

i'll let BI handle my case ^^

minor agate
#

But the eula does not permit feeding code and data into ai

red cedar
river imp
river imp
#

From the documentation? Lol

minor agate
#

Based on a quicj read of the thread. It seems so

humble pine
#

Will be great if you will take care of such ai-slop spreaders soon

lean moth
minor agate
humble pine
#

👌

minor agate
#

For now the issue is just game data infringements

south hearth
#

Can someone help me with error when i launch enfusion ?

river imp
south hearth
river imp
#

The A3 aspect is kinda moot. You spent all that time learning it and didn't compete with A.I. Your efforts weren't diminished.

red cedar
lean moth
river imp
#

It's not

#

The A.I. users aren't learning anything

#

Other than how to steal other people's shit and feed it to AI

#

I'm all for A.I. being used as a tool

#

As a replacement for actual thinking brains though, not so much

#

Using it to write a physics calculation that you might not understand is cool.

restive island
#

imma still say BI needs to maintain their own AI/MCP/whatever so they maintain control of the backend

river imp
#

Using it to write your entire mod though.

#

That's just laziness

lean moth
#

AI is a tool, it’s not the entire puzzle by any means

river imp
#

Write vague sentence, click 3 buttons, now have mod.

#

No one is learning from that.

fringe prairie
#

IsOwner() does not seem reliable for helicopters, so server and client can both own the same helicopter... unless there is some hidden method to "bump" a rplComponent, figure I should file a feedback ticket

river imp
#

You're not the owner of the heli

#

You have partial ownership

#

The server still owns it

#

Not a direct quote, but that comes from Mario

restive island
# river imp No one is learning from that.

you are assuming people want to dive into the code and learn it. Some dont and wont, they want to make a mod of their liking and then run around Everon in their undies. Whether it sux or not is up to the community

fringe prairie
#

Why does rplComponent.IsOwner() give true for client and server at same time, in a situation where it does not make sense (the player isn't in the helicopter anymore) Server seems to give and take back ownership from it's own perspective fine, but client (and more accurately my script depending on that check) has no clue

river imp
#

Not much of a hobby if you don't really want to learn how to do it

#

I wanna be a doctor

#

I just don't want to learn the interworkings of a human.

#

Makes perfect sense

restive island
#

does that mean you have to have served in the military to play a milsim like Arma?

open pier
river imp
#

You're now trying to argue with no merit.

#

Playing a game vs creating something

open pier
#

Ai will hallucinate its way to victory esp with enfusion script. It should not be a viable replacement to writing it yourself. Help with some calculations here and there tho should be it's intended use

restive island
#

working a medical scalpel vs writing out hello world. not seeing your point

river imp
#

If you wanna do things YOU must learn to do them.

#

I can't bring a robot with me to the operating room to do the surgery.

restive island
#

but when can I call 1-800-Ask-Zelik? Some problems are too complicated to figure out individually

red cedar
#

when it comes to scripting

restive island
red cedar
#

i've done that PLENTY of times, in fact it was even @river imp who taught me TF was a component and how to have it "instanciated". No need for AI when there is a helpful and passionated community.

winter jay
#

Folks, i was thinking so, but it is inevitably,
you need to embrace it and ride this wave

just look at older people,
they have trouble navigating basic phone,
technology will go log progress now

river imp
#

A big underlying problem is just not trying to learn for yourselves.

#

And requiring someone to help.

#

I've had my fair share of help

open pier
river imp
#

But 95% of this I learned by putting in the effort of looking at vanilla things

solid hearth
#

Stuck? Apply 4head directly to brick wall.

river imp
solid hearth
#

Eventually you figure it out. AI just makes stupid people stupider.

lean moth
#

If we are talking from a general LLM like ChatGPT

restive island
# river imp Exactly as Hideout said

"Bohemia AI, figure out what 1.7 changed that broke my 1.6 mod so i dont spend the next 6 hours looking at code because it interrupts my Dr Who marathon"

open pier
#

Outside the legality of it, if found youre violating something, that's a quick way to not be able to upload to the workshop

river imp
red cedar
#

or actually learning how to script

lyric inlet
#

Is it possible to trigger LODs through actions or triggers that don't include distance?

#

sorry to interrupt

open pier
#

I debug ES better than I can write code for it. Taking the time to read docs and understanding the engine itself is huge

restive island
open pier
#

Compile, wait for errors, click on em and go

restive island
#

That can use something like AI to narrow down what the issue could be

river imp
#

Of you could learn how to debug

restive island
#

my guy, people have jobs and want to jump on Arma to play a game with a mod they made. not have to manually trace down bugs to fix what an update broke, if AI can shorten the troubleshooting/debugging thats a win.

red cedar
#

dunning kruger

open pier
#

98% of the time the compiler tells me what's broken, the other 2% I'm missing a semicolon

river imp
#

My guy, if you don't wanna learn game development then don't make mods

lean moth
#

Unfortunately not really how it works anymore

river imp
#

In fact it is.

#

Just because some of you see if differently don't make it ao

#

So*

red cedar
lean moth
#

Blast gear, you’ll get one

river imp
#

If a job requires the skills to get it, the hobby requires them as well

restive island
red cedar
#

i think this conversation is currently just turning in circle

river imp
#

Why mod a game if you're not the one modding the game?

river imp
#

If it's outside your skill set, then you need to learn

#

It's been that simple the entire existence of our species

open pier
#

I spent 3 hours debugging the other night. I don't think ai would've found out that the constructor to my jsonapistruct had a typo in it

red cedar
restive island
#

what if I am a master coder XXXL and want to watch Dr Who and just want Bohemia AI to find what the patch broke so I can update the mod so people can play it

red cedar
restive island
#

what if i watch an unhealthy amount of Dr Who and it'll take me 3 months to release an update, vs AI telling me exactly what is causing the conflict

#

I find everyones lack of Dr Who marathons concerning

red cedar
#

that's fine, that's what's amazing about modding, do whatever you want whenever you want.

I postponed the work of one of my mod for 2+ months because i was busy with exams

river imp
#

It's a hobby. If you don't want to actively do the thing then don't.

red cedar
open pier
#

Understanding how the engine works will help with troubleshooting wayyyyy more than relying on chat gpt to answer. After a bit you'll just know what the problem is

fringe prairie
#

Think there is little point arguing here

restive island
#

@red cedar if you're a student put the video games down and go study /joking

red cedar
#

i have a 90% average i think i'm doing fine

fringe prairie
#

Rather not have the channel clogged with philosophy and more "oh my god" moments from devs on weird scripts

red cedar
river imp
gloomy lynx
#

i think the client owns the pilot compartment but not the entity

fringe prairie
minor agate
#

You have authority and proxy

#

And only one of thse can be owner at a time

#

Think of owner as a modifier to the host type

#

Ownership can be swapped at runtime by the authority

fringe prairie
#

I guess what is confusing me is that typically a gate like
rplComponent.IsOwner() should only return true for one machine, because there can be owner proxy and owner authority of course, but there should only be one. In my example, the server gives up it's ownership to the player machine, makes sense, but when it takes ownership back, the player still believes they are the owner.

#

So how to check otherwise other than through the rplcomponent

minor agate
#

You need to account for latency

fringe prairie
#

What amount of time should be considered a bug

minor agate
#

This is done for you

#

You can use the rpl callbacxk RplGiven/RplGive RplTaken/RplTake on any rpl enabled class

fringe prairie
#

I'll look into that - but the issue I was having relates to the client not being notified over several seconds, I honestly did not wait more than 20 seconds in my testing, but it seemed to take a long time if it does eventually figure itself out.

minor agate
fringe prairie
#

I'm checking rplComponent of the vehicle entity, on server I can see ownership change instantly along with client recieving ownership via periodic IsOwner check, it was only when the player exited the vehicle the server would evaluate as owner, while the client would also be evaluating as owner. I'll check soon to see if the client ever stops becoming an owner when exiting the vehicle tonight or tomorrow.

minor agate
#

Use the callbacks

ocean kernel
#

Whats the maximum number of decals on screen?

#

Wow decals have pretty good performance

#

This gives me an idea

ocean kernel
#

Does entity need to have a bounding box to show up in Queries?

#

And if that is the case how do I get a bounding box for an entity without a mesh, since the manual definition in the meshobject doesnt make it show up in queries

#

Yeah it appears it needs some kind of actual mesh 🙁

sage meteor
#
    //------------------------------------------------------------------------------------------------
    //!
    void OnSpawn(IEntity entity)
    {
        if (RplSession.Mode() == RplMode.Client)
            return;

        Vehicle vehicleEntity = Vehicle.Cast(entity);
        EventHandlerManagerComponent eventHandlerManager = EventHandlerManagerComponent.Cast(vehicleEntity.FindComponent(EventHandlerManagerComponent));
        if (eventHandlerManager)
        {
            eventHandlerManager.RegisterScriptHandler("OnDestroyed", this, OnSpawnedEntityDestroyed);
        }

        m_bSpawnQueued = false;
    }

    //------------------------------------------------------------------------------------------------
    //!
    void OnSpawnedEntityDestroyed(IEntity entity)
    {
        if (RplSession.Mode() == RplMode.Client)
            return;

        // If the vehicle was destroyed near its spawn point, delete the wreck
        if (entity && vector.Distance(entity.GetOrigin(), m_Owner.GetOrigin()) < MIN_DISTANCE)
        {
            GetGame().GetCallqueue().CallLater(PerformDelayedDeletion, 100, false, entity);
        }

        m_SpawnedEntity = null;
    }

    void PerformDelayedDeletion(IEntity entity)
    {
        SCR_EntityHelper.DeleteEntityAndChildren(entity);
    }

So I noticed with this code, the OnDestroyed event seems to occur when any of the hitpoints of the entity are destroyed (like headlight, window, rotor, etc)
Is there a better way to check the destroyed state of a vehicle?

ocean kernel
#

I mean you get the entity in the callback

sage meteor
ocean kernel
#

A conditional where you check if the destroyed entity is the entity running the script (or the entity that you want)

sage meteor
#

I'm not sure I understand what you mean sorry, I am guessing I might be able to check if I can cast to Vehicle maybe