#enfusion_scripting
1 messages · Page 29 of 1
because this code isn't related to your local client
the script get the sight comp of another character which is why my var have the m_target prefix
Reading the code would help I suppose 😂
Iirc this requires .acp sound work
Separate event for your subsonic round
I appreciate the answer and suggestions tho that's really helpful
Anyone know where it's decided that the player needs to go into the player queue? Is that even exposed to script?
If I'm not mistaken you get a token from BI to join a session and there are spots you they allow you to use and adjust in the server config for priority for server admins only
I don't think its a script ingame
Yeah maybe its a backend thing? I was trying to look into this new bug in 1.7: when the client crashes and tries to rejoin, they now get put into a join queue until the reconnect timer runs out and then it allows the player to join again, pretty much making the reconnect component useless. It worked yesterday so this is new as of todays update.
I'm sure there's someone smarter in the deal that can explain it better but from my understanding and again I could be wrong it's not something that can be edited, was just trying to save you some headache searching around 😆 hope you get this figured out my friend
I think I may have found a link to the persistence system? IDK Im digging around a bit more. I think I need to look at what happens when a player gets disconnected.
Where can I see what the IEntity types are?
void OnInit(IEntity owner)
{
string ownertype = owner.Type().ToString();
return ownertype;
/* Types.c >> proto native external typename Type();
Man player = g_Game.GetPlayer();
typename type = player.Type();
Print(type.ToString());
>> 'Man' <---------------- Where is this defined?
*/
}
I can help with this shoot me a dm
Looks like some ancient script bit (or DayZ?)
Man player is where Man comes from
It would be ChimeraCharacter in Reforger
IEntity player = GetGame().GetPlayerController().GetControlledEntity();
typename type = player.Type();
Print(type.ToString()); // SCR_ChimeraCharacter
Really wish there was an option for script editor to only scroll the tabs with mousewheel rather than selecting them. Hate seeing flashing scripts when all I need is to scroll the tabs to find one I need.
Old DayZ Standalone comment
I like "Append Closing Bracket" but I hate that typing {} ends up with {}}, most other editors solve this by ignoring } right after it autocompletes the bracket, why not the Script Editor?
I hope to see this in change log someday:
Engine
- Added: A3-like scheduler into scripts

Engine:
- Added: Try/Catch to the engine so it doesnt crash every 3 seconds
tbh what you would catch with these things do not cause crashes but only VMEs
Idk I feel like if you wrap ural truck animations in try/catch then the whole server wont crash when there's a bug in its door animations
Script Try/Catch would only catch Script VMEs
Not things coming from CPP
Ah so it's not implemented because devs dont know c++ has try/catch
Yeah I just mean the engine sorry
You can't try/catch seg faults 😅
try/crash
Scripting is obviously single-threaded, but before you could lean on extensions for heavy number crunching. Now with Enfusion, are we really stuck with just HTTP/WS?
I'd have to write the computation as a standalone tool just to call it over an API? And then there's the extra overhead on top of that.
Bad usage of try/catch can also be really terrible though especially if mods start to catch stuff they shouldn't be
Ok but I didnt mean script?
Why do some vehicles iterate through SCR_FuelNode.c multiple times for the same fuel tank? This looks excessive for **one **heli spawn
I get it if there's two fuel tanks, for like fuel trucks~~ and command truck.~~ actually I dont even know why command truck has >1 fuel tank, unless it uses the extra to power its spawn beacon
Try CTRL+TAB, you can cycle through the opened files without immediately opening them
It's there but just in button form
Or SweetPotatoh's option
Sure there are ways, its just annoying that scroll wheel switches tabs
Imagine that in the browser, its gonna be super annoying
i just noticed that it's backwards 😄
It has started to annoy me now that you have pointed it out

Questions about weapons: they have a chamber separate from the magazine, right? Or does it pull straight from the magazine? Is there a way to force chamber a bullet through script or is it just adding to the magazine's ammo count?
Chamber is separate from a magazine. You can chamber a round and detach the mag and still shoot. Yes ForceChamber or something like that was added some time ago, I think I exposed it to script too. It would be on the muzzle component
I see ClearChamber() in the BaseMuzzleComponent, but not seeing a ForceChamber() or similar. Working in 1.7 experimental as well :/
Then maybe I forgot to do that. Sadly it means it will take some time until it becomes available to you. Maybe a later 1.7 patch maybe 1.8
Hey everyone! I'm working on a mod for Arma Reforger using the ArmST framework and I'm trying to create a farming mechanic where a player approaches an object, holds an interaction key for a few seconds, and receives money (using ARMST_MONEY_COMPONENTS).
I've created a custom class CashAction : SCR_ScriptedUserAction with PerformAction, CanBeShownScript and CanBePerformedScript all returning true. The class compiles fine and appears in the Workbench editor.
I added it to a GenericEntity with these components:
- MeshObject
- RigidBody
- RplComponent
- ActionsManagerComponent (with UserActionContext + CashAction)
But when I play, no prompt appears at all when approaching the object. The Remote Console shows no output from my script, meaning PerformAction is never called.
Has anyone successfully created a custom SCR_ScriptedUserAction on a GenericEntity? What am I missing for the action prompt to appear? Any working example would be hugely appreciated!
is it an editable entity by any chance (**E_**foo.et)?
canbeshown is broken
remove the canbeshown and canbeperformed, get it to work, then add them back
Can I use these values for unique prefab IDs? eg 0x20000000F10 {} like below
modded class SCR_FuelNode : BaseFuelNode
{
override void OnInit(IEntity owner)
{
super.OnInit(owner);
Print(owner.GetID().ToString());
// returns this for vehicle 1 prefab: 0x2000000000000F7F {}
// returns this for vehicle 2 prefab: 0x2000000000000F81 {}
oh wait i can probably just use GetName() since that increments the number in its output
I get "Vehicle" when I try it. Anyway to see what the other types it could return with?
string ownertype = owner.Type().ToString(); // IEntity owner
Print(ownertype);
// out: Vehicle for a jeep, truck, helicopter etc
oh snap, thanks!
hi! how do i get the total character weight with weapons?
GetTotalWeight() of SCR_CharacterInventoryStorageComponent returns only gear and inventory weight as i understand (probably not all actually). perfectly i would like to get number that shown at top-right in inventory UI.
Get all stroages from the inventory storage manager and add all weights, or check how the inventory UI asks for it
these are entity ids and they change with every spawn. I am not sure what you want to achieve
Bad news, we might not be able to offer it, if you planned to use it on players it will cause desync, the reload process needs to happen on client and server in the same way. You can not just set a different chambered ammo on the serer while the player is shooting the gun
Arkensor, do you know if it would be possible for launcher and UGLmuzzles to be edited to allow the signal of Switchmode to be sent to the player and not just the weapon like it is currently?
Momo mentioned if its not doing it currently then its possibly a backend issue. #enfusion_animation message
what do you mean by Editable entity ?
If this help by any chance.
has CanPlace in SCR_ContentBrowserEditorComponent been changed in the newest experimental update? i cant see any mention on any changes in the changelog related to it but my script has broken after the update
Little tip when spawning items, make sure the spawning is happening server sided only. Without other configs set/methods returning the correct bool, pretty sure this code will run on client and server, which you don't want clients spawning anything
You'll get yelled at in the logs
ok i will try thanks bro keep you in touch
knew there was something wrong, you need to set the Position and some other stuff, try to duplicate what i got here, the "Y" for position might differ, when you click on it it'll show you some arrows to move around
That should atleast make the action viewable
also due to habit the naming is done through script:
override bool GetActionNameScript(out string outName)
{
outName = "Action Name";
return true;
}
@open pier @restive island@gloomy lynxguys thank u so much !!!!!!!!!!!!!!!! all works fine goose thankssss
can someone check a crash guid for me pls ❤️ 58764f4e-e312-4df2-be91-bbcb38b2a4ed
Yea I was looking for the unique ID of spawned entities. Some have >1 fuel node that iterates SCR_FuelNode.c, I needed a way to keep track of which node is iterating the logic more than once
vanilla logic will often ask for it on multiple events, that is no problem at all
vanilla issue we need to fix
np. Editable prefabs have an orange marking on their icon and are usually structures, regular prefabs have blue marking. Depending on the sub-prefab settings in a composition prefab, it will not carry over added components from the regular prefab to Editable prefab and it has the same result you were running into.
Is the result 0x2000000000000F7F {} the actual unique ID of the entity that stays with it throughout its life?
yes until it is deleted at runtime, not the same between client and server, not the same across multiple restarts
How can i get it from the server?
Call the same methond on the server, it is just like a memory address id, it is local to each machine
ah damn, thank you for looking. same with these? 3616537c-41ea-44e5-9f20-4dbe13503837 acb64d6e-775c-4e0f-afd3-4c5aa304bbe1 crashing a lot in the last day or so
is it some vanilla system we are opting into? or something generic
@torn bane a custom transport aircraft kinematic flight, openable ramp/doors, walkable interior, passengers riding mid-flight, would you build it as a full Reforger vehicle (compartment manager + AGR + the vehicle stack), or a lighter custom entity? What does the vehicle framework give for free that we’d otherwise re-implement?
I mean I have a ton of questions honestly but that’s the main one
It’s my first time touching vehicles with proper animations and models
The other ones I have are just props that I fly via script not real vics
this will be both
How do I force a vehicle to spawn in, I'm assuming it's out of streaming range? It will spawn in if I go to it in GM, but not before I do that. I want it to spawn in without me having to do that.
I did a C-130 aircraft flight model, I can answer some questions in DM if you like. But my questions is why you choose the kinematic path?
arent u using the redline one?
i already hit the wall btw, it needs to be A vic
kinematic because i dont wantplayers to fly it
ride it only
No, it's my own flight model
I see, then yeah, kinematic is the way to go, much easier 🙂
your work is very ahead of what Im doing
i basicallyneed a flying prop with animations that lets people sit in it
but ill take a look at your model if u dont mind
also how are u gonna work out your ramp collider? thats what im working on and redline team has had same issue too. for now only good example of proper ramps is coltons
The issue is that u guys chose to use a standalone Vic animation comp but that’s not gonna work u need the whole sim system
What do you mean? What is the problem with ramp collider?
when i close it the collider doesnt move with it
(my model) but ive seen r3d they have same issue (?)
You have to parent it to a bone, and the in the anim graph you have to add a tag to update collider when that animation runs
thanks a lot panda
I have also lost days on this issue, glad I could help 😄
MpObserver?
I'm trying to start up the dedicated server tool, it's been fine in the past but now I get this error.. Any ideas on how to fix?
Question regarding timing and CallQueue:
I am contemplating implementing one or more custom CallQueues into my mission, to not use the global queue.
- would it be a good idea to have multiple singleton queues with different priorities? Background would be that e.g. spawning groups is not as time-sensitive as updating game states or player flags etc. ?
- if I just use Call() in the queue with a time offset, how is that different to just loading up the global queue? Any way to defer low-priority calls to later?
- is there a proper way to load balance this?
- is there a way to properly profile my method calls? Or do I just measure deltatimes?
Any hints welcome
nvm fixed it
Using the global call queue provided by the game which 90% of vanilla content uses makes sense if it should tick even if the gametime is paused and you usually have millisecond accuracy. ScenarioFramework has it's own because it should not tick while the game is paused and other conditions. There isn't much to be gained from using a custom call queue instance unless you either have thausands of calls to tick and or all of them only really make sense to advance once every few seconds or so you can avoid some internal checking cycle if you know your times are in the order of minutes or hours.
Ok here is some yappter because i'm pissed at my blind self for not seeing it before but also i feel like this should throw a compilation error :
{
[...]
// Invoker and rank are inverted however it still compiles, would be cool to force casting to the correct enum type instead of allowing to pass int as enums
bool success = SetRankToPlayer(playerId,invoker, rank, false);
[...]
}
[...]
private bool SetRankToPlayer(int playerId, SCR_ECharacterRank rank, int invoker, bool allowDemotion = true)
i know this is on me, but still it is really irritating that i wasted so much time rewriting my setrank method while the issue were the params order
enums are ints, it's your job to make sure you're passing the correct args
I'm aware
I have just been losing my mind for a solid hour because of this silly mistake
Regardless, "would be cool to force casting to the correct enum type instead of allowing to pass int as enums' will never be a thing because you don't cast an int to an int.
Watch me
It doesn't matter how you do it, you're still always gonna be able to pass enums as ints, and vice versa.
So do extra stuff for no reason if you want, and I'll watch you accomplish nothing. lool
I'm just joking atp, I understand why it's like that just that in that one specific case it would've been useful
However
Being able to store an IENTITY var into an int without casting is pretty insane to me
What?
Yeah
I have no idea what you're talking about
elaborate
Was at the mechanic i'll send the thing in a sec
{
[...]
int masterPiece = FindPlayer(search)
[...]
}
private IEntity FindPlayer(string search)
{
search.ToLower();
PlayerManager pm = GetGame().GetPlayerManager();
array<int> playerIds = {};
pm.GetPlayers(playerIds);
foreach(int playerId : playerIds)
{
string playerName = pm.GetPlayerName(playerId);
playerName.ToLower();
string uid = KE_Helper.GetPlayerUID(playerId);
if(playerName.Contains(search) || uid == search)
{
return pm.GetPlayerControlledEntity(playerId);
}
}
return null;
}
This should not compile, yet it does
Why not? Does it throw a syntax error when you cast int to int?
Sleepy me wrote this masterpiece and i dont believe this should compile
But you're not storing an IEntity in an int, you're storing a player ID
If that were the case you would be able to do it with any IEntity and not just a player.
? are you sure ? the result from this method was always 1 i think the ientity was turned into a null entity check
the variable was called playerId because i was not paying attention
but it didn't store one (changed the var name)
It only works because you're specifically getting a player from the player manager.
oh
Wait, you're returning an entity, which makes no sense. I would expect workbench to yell about this.
Yes, that's what's happening. I misunderstood earlier when I first glanced at it.
fair enough
kinda weird that it cast implicitly from IEntity -> bool -> int without any warning or compilation issue
bools are ints
It's weird that you're declaring masterPiece as an int and setting it to a IEntity lol
It's also weird that workbench isn't yelling.
But, you're declaring it as an int and it seems to be returning it as a bool (null or not) which is an int.
@red cedar Any class instance can be converted into a VM relative pointer by casting with it.
Try (int)someInstance on console log and see
Ah that seems to be broken now
lol
It will return 1
Why?
It seems it was used before as implicit implementation for if (instance) or any other conditional to resolve to anything other than 0x0 when it actually is stored somewhere
But now it just goes into what bool is internally
if pointer does not point anywhere then it does not exist (nullptr)
in other words 0x0
but on conditionals when dealing with numbers, anything other than 0x0 returns true
@river imp @red cedar It's totally valid code due to the above
No bug or crash will happen with it
Is the weird compilation issue going to come to stable? o.O I just had another instance of this I believe in 1.7.
Simply changed the order of overrides and now its working instead of calling the vanilla method.
Nothing has been worked on regarding this yet
Stop using statics 
actually it was a little different this time. I had to override the function that calls what Im overriding to get it to work.
I personally dont use them that much, but mods that I mod do use them more often.
Tell the modders that I say to stop using statics 
@dire sinew ^^^
There is always problems here and there
@torn bane made a method not be static anymore by overddiing it without adding static on the override lol
(This is fixed for a while now)
Thing is that there were no moddability on statics before
But it was added as I placed high modding risk on it due to codecs being static
But modding itself kinda breaks OOP and general thought of it. So certain normal behaviors kinda break with modded
This one escaped us
But the change for this one is a bit convoluted so it will take a while as it's not that big of a problem
Meh, I don't see the point in creating objects for just a bunch of helper methods.
Truthnuke
does anyone know how air drag and side drag work for projectiles? I'm trying to integrate complex trajectories
How can I add a component to a prefab composition via script?
n/m found it i think: https://community.bistudio.com/wiki/Arma_Reforger:Create_a_Component
you can't
You don't have to do the integration yourself. There are already utilities for simulating trajectories. See BallisticTable and/or ProjectileMoveComponent::GetProjectileSimulationResult. Also keep in mind that wind deflection is not correctly implemented on stable. There is already a fix for it on experimental though (see https://feedback.bistudio.com/T195806).
No need any class you can just put your functions on top level
Helpers are static classes that you can reuse to get redundant stuff done quickly and easily
If you just put it within the class you're modding then you'll have the same method appear 250 times within your project , it would also be a hell to maintain
By "top level" I meant don't put it in any class. i.e. just put the function on its own and you can call it from anywhere.
No, but I don't know actually what adding static keyword would do or not do with top level function.
@red cedar @maiden goblet Do not do that lol
You will clutter global namespace (More name collisions and intellisense will confuse you)
And they are not moddable
Only after removing SCR_EntityHelper, SCR_Enum and etc 
Static methods for generic util classes are fine
But if you place gameplay logic on them
Modders will like to mod it or be forced
And that is where you land into the issue @spark otter ran into
So do not use static methods for gameplay logic
I use helper classes anyway, only global functions i have defined are "LogKittenEye" and "LogBackend"
does this already incorporate wind?
Yes, ProjectileMoveComponent::GetProjectileSimulationResult does include wind deflection.
does shellmovecomponent have this?
Yes, as it's a child class.
thanks
What’s the actual runtime bridge between AnimationControllerComponent.SetFloatVariable (or SignalsManagerComponent.SetSignalValue + AnimVariables) and the AGR’s variable space on a VehicleAnimationComponent-only entity (no wheeled sim layer)?
Does anyone have a mod for linking discord and BI accounts?
I do know it requires external software, i can handle that.
linking in what sense?
This bi identity is connected to this discord id, which is a user in my community discord.
you'll have to get them to link their own account
Well, i have heard of a few other people working on this. So i was wondering if anyone has a mod for it that I could reference or use?
And then, yes they have to do it in game.
Outside of the mod you'll need a discord Bot to support this.
My bot doesn't tie into the mod at all though, linking just allows them general views of their info like bans, bank balance and some other things.
I do this with my mod but I use an external backend to sync everything
I connect discord, Argus, game profiles and all are synced
You’ll need discord bot, backend, functions and mod
Im aware. I can handle the backend easily. I already have a player database. Linking is pretty easy. 1 new table and a API for the server mod to call that adds the data to the DB.
Is this a mod that I can repurpose or that I can you would let me use the code from? (More so the UI for the linking menu)
if he mentioned using a discord bot he's likely linking his acc using discord
unfortunately not
or a website
that's how i did it personally
Playstation players cant easily use typed / external tools. Im going for ease of use
i can help u though
If you dont mind helping me a bit with the UI, i could use some help next week. Ill be reviewing the UI tutorial before then. But also some pointers on properly setting up serverside code could be some help.
yes of course!! just shoot me a dm
my website and my backend
Im not sure what im looking at, but it sounds cool.
I was looking to set up event tracker with a map for my server using the event api from Server Admin Tools and a website.
u dont need server admin tools
Have you done any work with the REST API?
Some testing, i understand it well enough.
Thats the easiest part of what I want to do.
do you think you have to detect gun shots (proximity) or will the audio system tell you the loudness / output volume of all sound effects? so, loudness in dB.
What are you talking about?
Yee was gonna say that's your friend but atleast its easy. And you plan to have them link their discord while ingame?
Like their ingame, open some ui, type in their discord account and it links it?
Yeah. So Client Request, Rpc to Server -> server to backend for code -> send code to client
Player then goes to discord to register code with a command
Ahh gotcha, nvrm in what I was getting to, which was verification
It all happens through systems that (should be) are trusted as for their account authentication.
This also keeps registration minimal and easy to understand.
I think back to the name and bi identity spoofing.
But i also want to have in-game rewards like XP tokens/modifiers as rewards for events or compensation.
Eventually player profiles and stat tracking.
I have the opposite setup, go in discord and use a command with your Bohemia uid to link your accounts.
Afternoon all, does anyone have any idea where I can look to find how action options are added to the side menu? Specifically I'm interested in adding a prompt to these options. These prompts show when holding tab on keyboard when a weapon is equipped. Thanks 🙂
Yeah one sec
Much appreciated 
So that can't be trusted per say. You have to trust they put in the correct one or not put in the ID for another player. This can be a concern for cross platform bans.
Say I get the ID of a player I dont like. Go into discord. Link their account, then start saying heinous stuff. Now I can get another player banned from the arma server.
I as a server owner have the IDs of all players on my server... I wont abuse that, but do we trust all other communities? I dont let my admins even see the IDs. I have a ban system that keeps it hidden from them
AvailableActions.conf -> Hint UI config file
chimeraInputCommon.conf -> Register your keybinds
keyBindingMenu.conf -> Make it so people can modify their keybinds in the control settings.
and if you're looking for the code that displays it SCR_AvailableActionsWidget.c
Bohemia uids are public, if you go into any server and run the #players command you can see that. I don't have a layer of verification since all linkg does is give you view access to info, nothing ingame or out of game(yet)
Interesting, i have tinkered with all 3 of them, but i'm not seeing any changes, I'm not sure if the tag etc is needed and where that is defined. But I just duplicated the CharacterUnequipItem entry as what i want to do is very similar to that behaviour. E.g the conditions. 
Have you restarted the workbench after overriding the files?
Yeah. Does the tag in the AvailableActions.conf have any meaning? E.g do i have to define a tag anywhere else in a .layout file or whatever?
Does players command work for non admins?
And yes, the id is intended as public info. But for regular players, it is still something that links to them. So I treat it as personal info, not public info.
Slash commands are for staff, prefixed commands for players. Restricted access all around
player commond work for non admin if you allow it for them
I just keep tag as default
You know, just realized you're talking about the ingame command. That's all access
those are my settings for example
i only touch conditions, action and name
I'll try that, thanks for the insight though
Goodluck
also you overrode the original config right ? not duplicating or inheriting it ?
Yeah, overrode it
Still not there sadly, i just wanted to see if i could make it where it would hoist the weapon to the chest by having a separate bind and action. I assume i duplicated the correct action in the conf but it might not be? I'll just change the strings in some and see if anything changes
it was a general question I was throwing out there about loudness of game audio. I was asking if anyone knew a way to detect if explosions, gun fire sounds were blasting around you.
I wouldnt quite know... But something about Signals. They are used to trigger sounds, idk if you can detect by script though
Look into signals component
Is there an example on how to properly use the EntitySlotInfo attach entity
Currently it works fine for connected player but any JIPs do not see the item as attached
I've got it now that the server attaches it to the slot and then broadcasts to all clients to attach it
It seems like just attaching it from the the auth doesn't cause it to attach for proxies
The solution was to use SCR_EquipmentStorageComponent as that slot in there seems to actually be properly replicated using the same exact methods
Hey guys,
I'd like to implement visible holstered pistols on the character's hip — similar to how rifles are visually slung on the back or chest when not in hand. Would anyone happen to have any idea about this?
So when you go to an arsenal and you equip a holster and you equip a pistol if you drag the pistol into the container with the holster on it the pistol will show visibly in the holster and you can still equip it with the keybind
Just untick Holstered Hidden on the CharacterWeaponSlotComponent for the secondary slot
Vanilla game doesn't have weapon holstering into holsters. So what you're explaining would expect him to be using a mod that adds it.
Regardless, he wasn't asking how to holster them into holsters but, how to simply have them not hidden when holstered.
Yep, that's right ^^. Thanks for all those information. Should be easier than i thought 🙂
That's not a mod.
Where is that then if base game doesn't support it? Confused lol
What are you confused about.
Guy asked how to not have pistols hidden when they are holstered.
That's how you do it.
Another guy commented about holsters.
Holsters in vanilla game don't do anything.
I read this set of messages as there was a way to do it vanilla lol
To not have them hidden when holstered. Yes
You do it how I posted in the screenshot.
"Holstered" doesn't mean "in a holster" in this sense.
On todays episode of BI being BI
Holsters can easily be done as I've got the functionality floating around somwhere. Just weird that it isn't vanilla functionality.
Yeah I've always found it odd, it's been a thing since at least A2 and they didnt put it in reforger
I just assumed the game already had it because everywhere I have played has it but I guess I never play vanilla
I was just replying trying to help. I’ve asked many questions in here that have been jumped over and not responded to so I am just trying to assist.
It's not a big deal.
Questions do get drowned here.
If you're asking a question no one has answered it's probably because the thing you're doing is unique to you and now one else has tried to do the thing so they don't have an answer.
I’m honestly surprised people can learn enfusion I find it really undocumented and pretty confusing 😂 I’ve been writing code for 12 years and it makes me feel meh 😂
There aren't many like myself who will go out of their way to try to do the thing just to come up with an answer.
Or it's been answered 1000 times.
Well that’s what I like to do. I like to make things that I haven’t seen
As unfortunate as it makes my brain feel
Exact reason I have like 250+ unreleased mods.
💀 250 to my w.i.p 1
What kind of code?
Lua, TypeScript, C#, PHP ( Mainly on Laravel ) are my primary languages that I’ve been fluent in over the years.
So you have OOP experience. You should be able to do this blindfolded.
I’m writing the code just fine. I think it’s just understanding the engine itself and how it works more than anything 😂
Pro tip: it doesnt
It does.
Duh
Idk why it’s beating me up as much as it is to be honest. Just is what it is learning something new
Documentation is very minimal, api reference pages are useful, but I hope they set up a system similar to Arma 3’s function documentation on the bi wiki… perhaps with more options for community input & examples. It would definitely save us a lot of time and reduce the amount of questions on here. The boot camp videos are nice general tutorials, but it’s difficult to find an explanation of something specific you’re looking for in a video.
Only confusing thing I found was knowing the relations between Proxy, Authority, Owner etc. Knowing what is running where (on a proxy, or authority) and what can be done on X. Once you get past that hurdle it's more or less smooth sailing. Anything you could really want to know you just need to use the search function in the editor.
The best documentation for the game is the game itself.
Most everything functionality wise exists from scripts.
Meaning if you wanna know how something works you just look at the scripts.
The odds that there will ever be complete documentation for every function that exits on every single entity/component is very very low.
This isn't sqf where there are 2654 functions.
Ever tried arma 3 sqf? Even starting in 2021 when there was documentation, it was cursed.
Its always been like this i think. You dont get a lot of documentation or a lot of help. You just smash your head against it until it leaves an impression in your skull.
I get that, I’m just saying reading something like this
https://community.bistudio.com/wiki/Post_Process_Effects
is easier/quicker than going through the code base…
If there was an equivalent for reforger, it would be very helpful for new modders and people who dont have as much time to mind meld with the source code
One of us could set up a wiki.
It would take ages to document all of it 😂
I feel like now a days when game devs make moddable platforms you see a lot of document generators based on code comments that it can auto generate from but as Zelik said there is so much in here I could see a lot of it not being documented just out of time sake. Especially from having classes and embedded methods inside those classes and different attribute properties and the list goes on and on.
I will just have to start opening the SCR_ files and see how they work.
Regardless of how helpful it would be, it simply isn't gonna happen. This isn't A3 where someone with absolutely has 0 experience can just "be a modder".
There arent a lot of code comments in the complex systems. I think all base classes have them, although they sometimes feel sparse for detail or nuance
Api reference is already autogenerated, but there isnt a place/format for community examples like a3
You're expected to know things, specifically game development things. Your number one resource would be knowing how to debug.
Ah I gotcha. I was never in the A3 modding community so I wouldn't know anything about that.
If not for this I'd be lost 
But with the text search you can snag some dev comments that better fit your search 
Most poweful things in the script editor are symbol search, search in general and The watch tab for debugging. Yet so many overlook it 
Watch ftw
I have this opinion that learning to script for AR is more about learning how to navigate in the WB and knowing where to look at.
Most people already know how to write code in c# so with the exception of replication it's mostly about finding what already exists and can help you
A3 is the same, in a different way. The biggest challenge is the knowledge, not scripting
Obviously knowing OOP and being competent in debugging are prerequisites for this, but it is still just a fun hobby for people on their free time… Improving/centralizing the resources/documentation and involving the community would certainly be ideal, albeit cumbersome… the mods are a big selling point for the game and I think something of the sorts would result in more cool mods.
The problem is people not having the prerequisites which are obtained elsewhere. So not only are "we" required to teach you Enfusion specifics we're required to teach the prerequisites and I don't mean just script related things.
You can't swim as a hobby if you don't learn how to swim first lol. Just like you can't game dev as a hobby if you know nothing about game development. Every hobby has an entry level. And the entry level for modding this game isn't one that allows for 0 experience in game development.
Yes thats is irrelevant to what i am talking about.
The idea isn’t to make something that teaches people how to code or other foundational knowledge. It’s generally not in anyone’s interest to do that.
I simply want a platform that makes the information quicker to consume and easier to digest. Bi did it for A3, i dont see why it cant be done again, it’s not really that different when you think about it. “Functions, classes, etc are constantly being added and updated”… yeah that happened for arma 3 too lol, the wiki has never been perfect, yet it has always been a key resource for modders. There wouldn’t be even half the mods you love on the steam workshop if it werent for that…
It isn't, because you're expecting things to be documented in a way that anyone can just read them and do anything regardless of experience.
And it's just not that simple anymore.
I think thats where A3 modding excels. Its so easy to start with. You can just start scripting stuff.
Double click a player and write _playerPos = getPos _this; _playerPos set [1, (_playerPos select 1) + 100]; _this setPos _playerPos; and you can teach them about gravity. You can make that a one liner when you learn about vectorAdd and this can written, ran, and tested in a live game.
Reforger doesnt have the easy gateway into scripting.
Nope
Because you're expected to have prior experience.
No that’s not what I said…
Like, people dont read through all the source code of popular c libraries, npm & PyPI packages, etc. that they use unless they’re uber security conscious or planning on making forks… they mostly just read documentation and look at examples.
The vanilla scripts are the best examples currently, more than likely there will never be documentation for every function that exists, regardless of that you're doing elsewhere or your opinion on the matter.
That will be the best you get in regards to documentation.
Yeah I mentioned this documentation earlier, it is helpful, but it could be made better with a simple addition of community comments & examples. That way there is a centralized hub that just… makes everything easier.
Seeing examples of stuff being used in different ways adds insight and fuels creativity
People would also be able to explain edge cases where things dont work, like the community notes that i have seeen on the a3 wiki
Probably a bit into A4, we’ll see the same community created repositories that outshined the Biki. It’s felt like a wasted effort for the amount of things that constantly change, I’d imagine that’s why the wiki is in its state as well
You can run code on a live game, and server even and switch in between on AR (Enfusion)
You can also recompile scripts while any of these are running and take effect without having to relaunch
On top of that you can use all debugging on these
Yeah hopefully hosted by bi though… while i can see community hosted ones potentially being more informative/thorough, it just wouldn’t get the same quantity of input. Site traffic is a key factor, because realistically only 1% or less of users would actually contribute something. Fracturing the community of modders into a separate service might be detrimental to the point of a centralized hub.
Do you mean something like this? If so, it's up to the community #community_wiki message
Wait, really? How's this done? I usually compile, see if what I changed works, close out the 3d viewport, recompile changes, then relaunch
Yes I’m advocating for that, you see stuff like that on the a3 wiki.
I didnt know about this. But you cant Write new code in a live (normal) game, right?
Like in arma 3, I would get some buddies on and I would just run some scripts straight on debug console on the actual server for testing.
You can run both new code through remote console (Even on their machines)
And also change code and make it take effect without reloading the game or server
Are you talking about peer tools?
No
But it works on that as well
It's one of the reason why you have Diag exe for server
and diag exe for client
You would not be able to do this to a normal version (Non-Diag) of the game due to opening things for hacking
Okay. So I don't enough
But if both parties use the Diag exes then it will work
Diag clients? Are those with experimental or in regular install? (im AFK by 1100 miles rn)
They are on both stable and exp
And is there a video/tutorial on using them?
I think I used them in the replication bootcamps
also I think that I used it on the 2nd bootcamp video and the animation scripting one iirc
Noted
Is this left arrow or backspace? It's longer than the others
backspace
It would be nice if those shortcut keys didn't conflict with windows controls
So true. U may already know this, but if u use "Play in Fullscreen" under the play scenario button dropdown, the windows snapping hotkeys wont get activated when u use diag
Yeah but I'd rather shoot myself than play in fullscreen, I mainly use debug when in an xob preview
Yup
Especially when i'm tabbing between substance, blender etc
It could be easily fixed as well by making it press to toggle the menu not hold those keys down
you can just use LCTR + LWIN + LALT to avoid all that
Can anyone tell me where the launching of a rocket launcher is handled? (More specifically, launched by AI)
hold up, you mean I can tag the prefabs I give a shit about for easier finding??? 🤔
THis is not for naming
This is for 3D scene querying
It's not a dictionary
If you have some really heavy handling of entities that you need to query in 3D into the world every frame or so
and you have many of them then better to do it in isolation with the TagManager
Than to do actual world spherical query/trace or so
Beware that this is a mask, and by so it is limited to 32 for the whole game including all mods
In any case it is more recommended that in order to avoid compatibility issues to just use the GridMap mentioned after
TagManager is basically the same thing
Could we maybe put that in the wiki page for it? 
Why is it in powers of 2 and limited to 32 max?
Because filtering by mask is ultra fast
faster than just doing bit shifting?
Bit shifting is powers of two in regular integer binary
It says powers of two for non programmers reading it
I just use flags as strings in CSV with a custom parser
Hey @minor agate can I get some more details on the following crash if possible ? GUID : 0bb1899f-dc33-4c8c-8b40-b66fca52090b
WORLD : UpdateEntities
RPL : rpl::Pip::ProcessNetToGame
RPL (E): Item was removed from replication on local machine but there are still RPCs targeting it.
This may be sign of very serious issues! itemId=0x8000B725,
identity=0x00000000, rpc='Rpc_ProxyIncrementalUpdateCtrl_BCNO'
RPL (E): Item was removed from replication on local machine but there are still RPCs targeting it.
This may be sign of very serious issues! itemId=0x8000B742,
identity=0x00000000, rpc='Rpc_ProxyIncrementalUpdateAnim_BCNO'
How to pinpoint which mod/prefab generate it?
Hey all,
I'm stuck trying to get a custom keybind to open a custom UI in my mod. I just want the I-key to open a custom ChimeraMenuBase (or even just a widget via Workspace.CreateWidgets).
I've tried the following:
Overriding chimeraInputCommon.conf with a new Action and adding it to the IngameContext via additive ActionRefs.
AddActionListener and GetActionValue don't fire for my action (but vanilla actions work fine with the same code).
Creating a custom context and calling inputManager.ActivateContext("MyCtx", priority) every frame via CallQueue - still nothing.
inputManager.CreateUserBinding().AddBinding(...) programmatically - it logs success but polling always returns 0.
As a fallback I rebinding the vanilla TasksOpen action - that works, but Reforgers Objectives overlay opens at the same time.
Is there a standard / recommended way to make a mod-registered action actually fire in Reforger?
Or should I just mod the vanilla TasksDisplay to hide itself when my menu is open? I saw @red cedar tip about only activating context for one frame, but the loop didn’t help me either.
Any help would be greatly appreciated!
I don't appreciate being pinged for that
Well, I did make a ticket for 64 bit flags: https://feedback.bistudio.com/T196144 😅
How many flags do you need
67
If I make a custom class1 and have it inherit from class2, why do I get "class3 (inherited by class2) is private?"
This happens when I make an object for class2 within class1
Code?
I am not sure if we will be able to do this, there is some interoperability between enum type and integer which is 32 bit. the only 64 type we have is for some engine controlled ones. But we will see, having a ticket is better than never asking for something
If any BI employee can help me get some more info related to this crash it would be really kinda cool
Animation graph problem. You had 102 mods on so very hard to pinpoint where the issue was coming from exactly.
It crashed during evaluation of animation graph
okk ty
It's one of our most common crashes
that's fair, thing is it happened right as someone was toying with some feature of my mod so i was wonderring wether it could've been caused by my mod or not
that's why there was a bunch of pageDown logs before the crash, funny timing
It could have initiated it, but not be the direct cause
I do not know your mods so I can't give a guess
But it seems it's just due to anim graph corruption
my mods doesn't toy with animations so i'm not sure how it could've initiated the crash tbh
Do you show previews of prefabs somewhere?
or spawn prefabs?
i do spawn a single prefab locally which is a camera then i move it around
Anything dealing with entities that are animated can initiate it
but again it would not be the root cause
would snapping the camera to for example the sight front position be likely to cause that?
I think this can crash if the bone is LOD restricted
would it cause a similar anim graph crash too ?
I don't know. the crash is there for a long time due to it being obscure
oh fair enough
But if you find a consistent repo then let me know
sure
Still trying to figure this out
Did you register your menu layout in chimera menu.conf? Did you register your keybind in chimerainputcommon.conf?
Are you wanting an action to open a menu or simply just press a key to open a menu?
Yea, my menu is registered in chimeraMenus.conf (inherited from vanilla), layout file exists, opens fine via Workspace.CreateWidgets().
Keybind tried it, that's the part that's broken for me. Added a new action in chimeraInputCommon.conf (both standalone and inherited), added it to IngameContext via ActionRefs - InputManager just never picks it up at runtime. GetActionValue() returns 0 forever.
I just want a keypress to open the menu. Nothing fancy, no menu stack, no HUD. Press I → menu opens, press I → closes.
anyone know what this is
nevr had this issue
now i am
nothings changed since last publish
class MyMenuComponentClass : ScriptComponentClass {}
class MyMenuComponent : ScriptComponent
{
override void OnPostInit(IEntity owner)
{
super.OnPostInit(owner);
InputManager input = GetGame().GetInputManager();
////CHANGE THIS TO YOUR INPUT NAME
input.AddActionListener("UseKillstreak", EActionTrigger.DOWN, OnKeyPressed);
}
protected void OnKeyPressed()
{
if (GetGame().GetPlayerController() != GetOwner()) return;
//CHANGE THIS TO YOUR CHIMERAMENU ENTRY
GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.HFS_Shop);
}
}
Place this on the player controller
Under context in chimera input find ingamecontext add a new action ref with same name as your input.
make sure to reload your workshop when changing chimerainput as that gets loaded at start.
i could be wrong, but i tested and it works for me.
Perfect, thanks man. Just have a few questions:
ChimeraMenuPreset.HFS_Shop - how did you register that enum entry? Did you add it in chimeraMenus.conf or somewhere in script? I have my menu working via Workspace.CreateWidgets() directly, not through MenuManager i was wondering if I need to convert it?
"Place this on the player controller" do you mean as a child entityin the player controller prefab in Workbench? Or modded class onto SCR_PlayerController? Just want to make sure I'm attaching it the right way.
Again thanks man!
you can create a modded class MOD_ChimeraMenuBase.c
modded enum ChimeraMenuPreset : ScriptMenuPresetEnum
{
HFS_Shop,
};
Override the playercontroller ({6E2BB64764E3BE9B}Prefabs/Characters/Core/DefaultPlayerController.et)
Add your menu script to this controller as a component, this will allow the player to open the menu
do you just want a widget to pop up or have a functioning menu? meaning you want players to click a button?
If you just want some information to pop up, its far simpler
Fully functioning menu. Players need to click action rows (use / drop / give / sell), not just see a
popup. So I'll wire it through ChimeraMenuBase + register the preset via modded enum ChimeraMenuPreset {
My_InventoryMenu } and open with GetMenuManager().OpenMenu(...) so I get cursor + focus management out of the box
yeah follow my guide and wire it through the menu, i wouldnt use Workspace.CreateWidgets() for this as it wont function as a menu, i went through the same issue in the beginning where it would pop up a widget but i could still move around xD
figured it out eventually and now i have a full functioning shop in game
Yea i am trying what you told me right now, crossing fingers that i get it to work
Hope this helps, lmk if any issues
Is "UseKillstreak" in your example a CUSTOM action you defined in your mod's chimeraInputCommon.conf? Or is it a vanilla Reforger action that already exists in the game?
I've replicated your setup 1:1 in my mod:
- Action "My_OpenInventory" defined in mod chimeraInputCommon.conf
(inheriting from vanilla via ActionManager : "{795184CF...}") - InputSourceSum > Sources > InputSourceValue with keyboard:KC_I (no filter)
- ActionRef "My_OpenInventory" added to IngameContext
- modded class SCR_PlayerController with AddActionListener("My_OpenInventory",
EActionTrigger.DOWN, callback) in OnInit
The listener registers successfully (my log fires on player spawn), but the
callback NEVER fires on I-tap. Same code works fine for vanilla actions like
"MenuOpen"
Again thanks man!
did you reload tools? chimera input does not update unless workshop is fully closed and re opened, i found out the hard/long way. UseKillstreak is my own action, players press a key to use a killstreak they have bought from a shop but i modified it to open a menu so i could give you some context. My shop menus are opened via an action instead of a keybind. Also, add a filter. that determines is pressed, is held etc
Inherited or override ?
I will try tomorrow, been at it for a few hours now. I really appreciate you taking your time, to help
Inherited
You need to override!! Sorry I missed that
That is 100% the problem then hahaha
I sent that earlier, and then saw how many messages yall sent and was like "oh i bet this is useless now, i doubt this is it" 😂😂
Btw, you can inherit. But then you need to replace the reference to the original file with your new file. This is generally safer, but few people do it and it is more tedious.
Inherit is not safer lol. Prefabs, etc. where your implementation should grow with the original, yes, but configs that must have your stuff in it, override is just inherit but you are adding to it directly. The runaround of replacing the reference with your inherited version likely will create problems with any mod that tries doing the same thing, your actions would be missing depending on load order, etc. Unless that isn't what you were saying lol.
Inherit is safer when you have multiple mods that modify the same file.you guarantee your changes are last.
Now if everyone did an inherit pattern, you instead would have to compat everything by merging all the changes, the solution to the problem you point. So yes, Override has its place. But its downside is you deal with conflicts where two mods have conflicting changes. Load order would decide whose mod has final say
yes but when you add things to an overridden config, there should be no conflicts?
Some people use override to delete or modify existing things, those can lead to conflicts
Because all an override is doing is adding your entries, or modifying existing entries - the order shouldn't really matter at all unless there is a conflict, if you inherit that config, then point the game to your version, you undercut anyone also doing inheritance, you will probably be fine yourself because everyone else is doing override, so your inherited config you are pointing the game to is still inheriting their overrides. If two people do inherit pattern, whatever mod loads last would win and the other mod loses their config entries. So to your point you will still run into conflicts with config changes override or not, but I think the consequences of inherit/repoint at for configs is greater issue
If one mod checks disable on something, and another mod checks enable - yeah there might be a conflict there, but I haven't run into the issue with that. What I have seen is GUID copies, like duplicating without changing name, causing the vanilla config to be overridden by the duplicate and preventing other mod configs from overriding successfully, but really all of these are preventable mistakes and I'd rather not have my keybinds not work because some mod took ownership of an inherited file.
I despise those who don't add prefixed to their classes/configs
But i've ran into a bunch of conflicts issues, had someone use the same variable in the same class (so i was hammering his api with http requests)
A mod changed which config to read from to a duplicated version, etc
Can you un-override something? Like say mod A overrides two things, but you only want one thing and for the other to remain vanilla so Mod B can override it without having to be later in the load order because for reasons it needs to be earlier
Or at that point do you just have to make a compat
You could use the keyword vanilla instead of super to execute the non-modded method but it'd still be load-order dependent depending on what exactly you're trying to achieve (i.e stopping the override of another mod)
Going insane:
Say I have a vehicle which is animated via vehicle animation component.
I have a slot on the vehicle which the animation component animates via graph.
I wish to swap the model at runtime
The game crashes with each attempt I have tried. Understand that the base game does black magic rotor head swapping, trying to replicate a similar feature. Not sure if the issue is animation graph getting extremely mad, rigid body being mad, or something else.
@fringe prairie @storm bobcat It seems there is confusion in this chat about what override configs is
config override creates new config with inheritance that make the inherited config behave as the original one but with the added or modified entires
config inheritance creates new config with inheritance, which you then have to make anything in the game that needs it point to it. this is problematic for modding when dealing with multiple mods trying to add things to the game
config duplicate creates a new 1:1 config from snapshot of the original of the time at creation.
Best one for modding is config override. Doing the others is like not calling super on scripts
I'm just fine. Also that's a great analogy. Idk why agent is on a rant.
Overide did it, this is why i have tried 8 times, without it even running in logs. It worked the first time with Override. Aprecciate all of your help yesterday. Same goes to you guys @storm bobcat @minor agate
Happy you got it working! if you need help with buttons just lmk 🙂
Glad to hear. For simple things, you can just stick to override.
(This part is to address the convo above) All i was pointing out is that you could also replace the file above to achieve the same if you really wanted.
But if someone does the same, to the original and loads with your mod
Your mod changes will then be not taken into account if loaded before, or the mod from the other mod will not be taken into account if yours is loaded after
That is where it breaks when doing it with inherit
It's not the same result on this environment of multiple mods targeting the same file
I have 3 Factions in my FactionManager, only US IsPlayable, there's a ConflictMilitaryBase at 3 different points, all the faction info is set on the various parts of the CMB. When spawning in, sometimes the "FIA" base is an option for US spawn? I've double and triple checked the Faction Affiliation settings and they are all correct for their respective factions...
I used the Game Mode Setup plugin with Conflict.conf
Would it be possible in the future to have more exposed methods for interacting with CharacterAnimationComponent linking system? A method to force a link would be nice
im working on a scoreboard mod and this may not be the place to ask, but i figured someone here would have the answer. i had it working in workbench as a widget set to hold F3. it would show on press and hide on release. now when i uploaded it and attached it to the gamemode in a dedicated server, it did nothing. the client and server arent communicating. the server shows its tracking data, but nothing writes when i push the hotkey. this may be a simple fix, maybe not. anything helps. i would like to change it to a menu in order to be able to add a keybind to the settings if that makes this more simple.
Since you appear to be logging the data serverside, how are you sending it to the player?
Grok
Is it possible to access locked entities via script and change properties? I am trying to create a script that turns off all street lamps within a certain radius, but it doesn't seem to work.
I might be doing things wrong, but I wanted to check if it's even possible
playercontroller called from onupdate with addactionlistener pulls up the widget overlay when i have the component added to the gamemode in tools but not when online
Which class type has inherited behavior of a unit versus being a skeleton or template? Like how CAMan != Man
B_NATO_F was just a rifleman I believe but had things like the uniformClass primaryWeapon uniformItems array list vestItems, etc but inherited functionality from the Man class.
Basically my question is: which base class can I make soft modifications to have a global affect on all units
Iirc we don’t need a signed mod for game data modification through enforce scripts now right?
Locally for each client yes. Via their entity IDs. Or finding them via world query
Perfect that's what I try to do. Doesn't work yet, but at least I know it's possible. Gonna keep trying
Someone actually just made this if you’re making it out of necessity
resolved the issue
Is it possible to script regular lights and lamps too?
For example I copied the ceiling lamp from the villa on Kolguyev which has lighting built in. I can access the LightEntity via script and turn it on/off, but the emissive texture of the lamp mesh stays lit, obviously.
How does Bohemia do this? Does the emissive texture act like a StreetLampComponent and automatically turn emissive when it's dark? I found nothing in the components that would suggest any way to control it.
The lamp prefab is completely identical to the regular, non-lit version: except for the texture being a "_on" version, which is emissive at night, but not during day.
I want to be able to turn lights on and off inside a building.
interesting question. i think i just replaced the lamp with the on/off state in breaking contact (attached to truck) 
Hi everyone. I need some help with my vehicle. My vehicle has 2 rear passenger seats and one gunner station on the M2. The gunner station has a hatch that I animated using .siga and .pap files, and I added the action to the vehicle to open it. I would like to know if it is possible to make the 'switch seat' action appear for the two rear seats to move to the gunner position only if the hatch is open
use or create a override for
SCR_SwitchLightUserAction (ActionsManager)
vanilla example
{2CB0AA2A87842C18}Prefabs/Props/Civilian/LampKerosene_01/LampKerosene_01_military_USSR.et
Those are for the InteractiveLights though? I am talking about the chandeliers-type ceiling lights in the villa of Kolguyev, as an example. Those aren't player-interactive
That doesn't matter, the only reason the light is "interactive" is because something makes it interactive. I.E. a component
ParametricMaterialInstanceComponent allows changing the emissive at runtime.
Which is what the "interactive" lights use.
Are scripts cached anywhere in workbench for a project? Deleted the scripts folder after hours of troubleshooting a crash, restarting computer, etc. To find out the crash happens with the scripts folder removed from the addon. I need to nuke it from orbit.
Resource holder = BaseContainerTools.LoadContainer(m_sCommandingMapMenuConfigPath);
if (!holder || !holder.IsValid())
return;
BaseContainer container = holder.GetResource().ToBaseContainer();
This is a typical pattern of ResourceName->BaseContainer aquisition I see in vanilla scripts, I assume its not worth it checking if GetResource() or ToBaseContainer() is null and its guaranteed that you'll have these if you have valid Resource, right?
Happened to me as well
I had to publish a new mod
Have u deleted the rdb file?
And re tried ?
Another issue: I wrote a custom ScriptedUserAction that I use in the ActionManagerComponent to trigger my script (turning steet lamps off in x radius). It works when I walk up and interact.
When in GM mode, I can see the interaction and it shows up correctly when right clicking. However it doesn't execute the PerformAction() method.
What do I need to do to the ScriptedUserAction so I can interact via GM?
i might be wrong, but gm is not a player, he basically acts as the server.
when u enter gm mode
so youll need some wiring for that too
hey big ask im sure I can do it myself but has anyone got doppler effect working as a sound for engines etc yet?
saw some talk from a few years ago in audio figured worth shot to poke here too
compute relativeVel = (planeVel - listenerVel) · (listener-to-plane direction) per frame, derive a pitch ratio, push it as a new signal into SignalsManager and add a Doppler curve to each loop in the .acp.
or check for vanilla flags (I did not find it)
GM is a player's role with special permissions, like - to open the editor screen.
Usually from GM you access not ScriptedUserAction but a child of SCR_BaseContextAction.
Do I get it right, that your lamp has the ActionManagerComponent with ScriptedUserAction and that action is accessible from GM? Just out of curiosity - have you tried to run this action from GM when your actual character stands near that lamp?
Thanks man amazing ❤️
but why then if i set entities non player visible, they are not visible for clients, but server (and gm) see the entity (live dedi)
imean server ok, but gm?
sorry if its a dumb question, itssomething i just observerd never digged
wait, what do you mean by 'server see the entity'? Server admin or the actual dedicated server process?
it's not dumb, just naming things is hard
Let me know if you get this working, its something i could never figure out if it was possible on the audio graph without writing a custom script. i dont remember ever seeing a Doppler curve/pitch manipulation node.
example, i have a server owned entity, a plane, earlier during development i did some testing, and by mistake i set it as only server visible (maybe streaming settings, cant remember) (non visible for clients). when i then tested it in a live server when i was in gm camera, i could see the plane perfectly, but as player i couldnt (which i guess for normal client players is correct) thats why my question. and why i thought when switching to gm u act like server.
which could be 100% wrong
but tl;dr i set a entity only server visible, and i u are a player client, and switch to gm, u see it
I heard a drone video the other day and my engine sim for shahed sounded identical minus the doppler really got my wanting to get it good
i feel you, i have my jet audio set up sounding real nice but its just missing that doppler effect xD
lets collab 😄 send me a dm
my shahed flight physics are pretty solid in peer now to. just need to replicate for real plane but anims everythign working nice 🙂
you mean this?
or you're setting up flags in scripts?
no in this case i used .et editor
like normal components setup
let me find it
GhostNetwork/Prefabs/Vehicles/Aircraft/GHOST_C17.et starts with bare Vehicle { — no parent prefab inheritance. Every vanilla boardable vehicle (Mi8, UH1H, M923 …) inherits from Prefabs/Vehicles/Core/Vehicle_Base.et, which provides a properly-configured RplComponent. I did not.
The C-17's RplComponent was an empty {} block, which defaults to a static / editor-placed replication mode:
- GM camera uses a different streaming policy (or idk) it sees the entity
- Normal player client streaming filters it out as if it were a never-placed editor entity so invisible
And the streaming layer never registers a dynamically-spawned vehicle that isn't already in the streaming DB, so even with the right "Rpl State Override" the entity gets gated by PVS/distance and never reaches clients.
i fixed it but just curious how gm camera sees it if its client controlled???
when i am literaly not streaming it to clients
i also set Streamable Disabled later on so i can spawn it kilometers from world bounds
This is how my entity is set up. TTT_ToggleLight is my "ScriptedUserAction" script that searches for all streetlamps and destroys them.
It works fine when I walk up as a player and interact.
When i am in GM, I can see the interaction and click it, but nothing happens. It never executes the "PerformAction" method. It does however call the "CanPePerformed" method when hovering over it or clicking it.
"searches for all streetlamps and destroys them." From the player? from the street lamp thats being toggled? or is that a custom switch prefab that gets lamps around it?
From the pOwnerEntity which I assume is the entity that the ActionManagerComponent is attached to (in this case the electrical switch thingie in the picture). Just for clarification, when using GM it does not even go into the PerformAction method because the debug message is never printed to the console.
enable your rpl component
THAT IS IT! WORKS NOW. Holy shut I am stupid, I didn't see that 😭
Hi everyone. I need some help with my vehicle. My vehicle has 2 rear passenger seats and one gunner station on the M2. The gunner station has a hatch that I animated using .siga and .pap files, and I added the action to the vehicle to open it. I would like to know if it is possible to make the 'switch seat' action appear for the two rear seats to move to the gunner position only if the hatch is open. Is it possible? Thanks in advance to those who will help me.
Who is this genius who forbade variables in methods and in classes to have the same names?
Is anyone having issues with the scr_spinningwidgetcomponent and scr_scenariouicommon? The error message only shows question marks.
😀
Just to clarify, these are scripts from the game itself
I have coined this the evil compile bug
Good changes, it just crash in process of fixing this stupid error... 15d52fe8-9d5e-45fc-adbf-433656edfd61
CodeTerrorist
Can I use singletons to create bootleg namespaces
im having same issues not sure what to do with it
Anyone know if you can have an AI placed in world editor or whatever entity but have it disabled upon game start but then have it enabled (spawned) via a script?
I don't want to spawn an entity because there are various properties that need to be set so instead i want to enable/disable an entity.
why not just spawn them in via script, what are the properties scripting cannot set?
error: Unknown type 'SCR_AutotestCaseBase'
💀
PS Someone broke (or it was broken all time) copy error option...
It returns:
scripts/Autotest/Game/TestFramework/SCR_AutotestHarness.c(218): warning:
Or random garbage in error text, looks like someone miss with string pointer in formatter xD
scripts/Game/Editor/Components/EditableEntity/SCR_EditableEntityComponent.c(786): warning: �b,�
... who the f*ck need to write in changelog that there is new autotest script module...
various scenario framework properties and QRF stuff set on the AI area entity
Is this where all the cool kids hang out.
Test `V30_...` did not set result after all main steps completed.
Someone forgot to set first successfull result inside AssertTrue...
Find Symbol is broken... sometimes it can't find symbol whose code I'm literally looking at in script editor.
Have you thought about asking chatgpt?
Ask chatgpt about who broke thing in script editor?
Why it can't find TestBase which is vanilla class?
@pliant ingot what is the issue maybe I can get an answer for you
I'll research this — Vlad is hitting issues with BI's autotest framework after the 1.7.0.41 update. Let me check what
classes exist in the new docs.
SCR_AutotestCaseBase exists in 1.7.0.41. Let me check its inheritance and look for TestBase.
WTF?
BIS
Also quick question but why did you enable match whole world and match case?
Just curious
ChatGPT says to do it
to find exact match for function calling/overriding
- SCR_AutotestCaseBase still exists in 1.7.0.41.
File path shown by Doxygen: Autotest/Game/TestFramework/SCR_AutotestCaseBase.c. Inherits from native TestBase. If his
addon now says "Unknown type", BI almost certainly split the autotest framework into its own script module in 1.7
(matches his "new autotest script module" complaint). He needs to add the autotest module as a script dependency in
his addon's .gproj / addon config. The class hasn't moved namespaces — only the bin it compiles into.
ill msg you
Let me ask grok, i always verify the information i receive across multiple sources
Thank you!
Message sent..
And you are wrong
Good luck
I solved it
your chatgpt skills too low
- The class HTML page exists in the 1.7 Doxygen ship:
ArmaReforgerScriptAPIPublic\html\interfaceSCR__AutotestCaseBase.html
Page title at line 9 of that file:
<title>Arma Reforger Script API: SCR_AutotestCaseBase Interface Reference</title>
And at the bottom of the same page (line 363-365) Doxygen lists the actual source file:
The documentation for this interface was generated from the following file:
Autotest/Game/TestFramework/SCR_AutotestCaseBase.c
The class is referenced by other public APIs in the same Doxygen — meaning BI's own 1.7 framework still uses it as a public type:
From interfaceSCR__AutotestHarness.html line 143:
static void Begin (notnull SCR_AutotestCaseBase testCase, bool autorun=false, bool verboseLog=false)
SCR_AutotestHarness.Begin(...) takes a SCR_AutotestCaseBase parameter. If the class didn't exist, this signature wouldn't appear in the shipped 1.7 Doxygen.
-
It's in the class hierarchy. From hierarchy.html line 7943-7944:
TestBase
└─ SCR_AutotestCaseBase "Base game test class" -
Four concrete examples ship in the 1.7 Doxygen extending it (visible in the inheritance map of the class page):
- SCR_TEST_Example1Subject_Counter_CountsToFive
- SCR_TEST_Example1Subject_GetFive_ReturnsFive
- SCR_TEST_Example1Subject_NoResultExample
- SCR_TEST_Example1Subject_TimeoutExample
All four exist as their own Doxygen interface pages under interfaceSCR__TEST__Example1Subject__*.html.
What this means practically: BI's 1.7.0.41 Tools ship publicly documents the class as existing, with a known source path of Autotest/Game/TestFramework/SCR_AutotestCaseBase.c. If Vlad's
compiler says "Unknown type", his addon isn't pulling in the script bin that compiles that path. In 1.7 BI seems to have moved autotest into its own module (which Vlad noticed). He needs to
add the autotest addon as a script dependency. Same way ArmaReforger/Game was a dependency in 1.6 — except now there's a separate autotest module that has to be listed.
Ask him to paste his addon's dependency list (.gproj dependencies block) — that's almost certainly where it's missing.
Man...
You're just an idiot trying to be cool.
You're not even close to solution
I shot you over another message. not sure if it helps.. but I tried..
I offered to track down the information for you and send it over. Sorry for trying.
@pliant ingot you building anything cool in Enfusion engine? What stuff are you working on
sorry, i dont frequent here much. Just trying to get into the community chats more :/
Blindly copy pasting things between here and chatgpt will not get you bonus points lol
Sorry, i have spent a lot of time on documenting reforger , engine and api bugs for my project so was just trying to help.
Please stop ragebaiting
I was going to put together my bug list for BI but honestly it seems like a lot of attitude around here
Was just trying to help.
Honestly 9/10 ragebait. I fell for it
How dare you get upset when I pour garbage in front of your face. It's free garbage. You should be happy you are getting free garbage!
But serious, if you guys do have questions just ping me on discord, i can always try to help.
Yeah sure i'll keep that in mind
😭😭😭
Sorry for pasting in some information. I was just using my local resources to help out. Next time I'll use personal chat more. Apologies.
Seems like there is a lot of attitude around here. Arma modders always gatekeep...
I hope to share some information. Thats why I'm here. Just trying out new things, new ideas, iterating over and over trying to find out how stuff works.
Can you make me an Arma Reforger themed cookies recipe
no but im almost done with my single mod a3 wasteland remake
Please
im close..
cookies. .ill try
ill put bacon cookies in the mod for yah.. 😉
question: what channel is the best for Just Reforger scripting/modding. is there another that most people chat in to discuss code etc?
or is it just a mashup of all enfusion programmers together
Don't confuse programmer and vibecoder please
It's like confusing an oven for a microwave
Ooh you're one of those
I am
any ideas on how to fix this or do i just wait for bi
So much hate for the AI
Depends on how good the cookie recipes are
They are okay cookies. Not the best.. Not perfect like a chef will make... but we have lots of cookies to eat. All sorts of cookies , fun cookies.. but if you want perfect cookies you may want to check with the others in this chat I guess.
this has been a fantastic read
excuse me while i go attempt to suck start my shotgun
Things under doxygen define are for doxygen example docs
I have same with TestBase class, which isn't doxygen related
But now I can't repeat it
You are right
Its on its own module now. So if you have it in game before then it wont work
But i am not sure if that is the case 1.7. But thats direction autotest is taking
Reason for that is that we do not want autotest classes to clutter game module
And cause issues with compilation, and autocompletion and the likes
I got this Tuple2 error because i used file overrided gamemode, however its never used Tuple2. When i copied BI changes to my file this error gone.
what changes from bi
i think Tuple2 class scripts not loaded because you have other error. I got 47 script error but needed fix only first 6 and all ok
@opaque sand any errors before that in the WB ?
no updated tools and got these errors
What changed on visualization in WB? i see new _WB_GetAfterWorldUpdateSpecs thing, and added to my code but _WB_AfterWorldUpdate never runs.
Do i need enable visualization or debug in WB somewhere for it?
#ifdef WORKBENCH
override int _WB_GetAfterWorldUpdateSpecs(IEntity owner, IEntitySource src)
{
return EEntityFrameUpdateSpecs.CALL_WHEN_ENTITY_VISIBLE;
}
override void _WB_AfterWorldUpdate(IEntity owner, float timeSlice)
{
// this never runs
}
#endif
if you guys have your own custom systems, just adding in systems conf is not good enough. Need to register using:
override static void InitInfo(WorldSystemInfo outInfo)
{
outInfo
.SetAbstract(false)
.SetLocation(WorldSystemLocation.Server)
.AddPoint(WorldSystemPoint.PostFrame);
}
I was kicking myself in the nuts over why this thing wasn't being detected...
Also my mod's toxic players killing eachother in spawn because our customized spawn protection system was no longer working
Removed: SetActionDuration removed. Configure it via config only
Sorry to interrupt, but I presume this means I can no longer dynamically set the duration of a userAction, or is there another way that isn't hardcoded in a config?
Yes user actions were fully moved to prefab data to save a lot of memory
@minor agate idk if peer tool launch delay was in the works or if it was added from that thread i requested it in but thank you thank you thank you thank you thank you thank you
Too bad peertool just doesn't work anymore.
did u complete the right of passage ritual? download server. open game close game open tools?
Could today's update have removed a mode script when opening Workbench, or am I just imagining things?
are you referring to the setting in Edit prefab.et > SCR_ActionsManagerComponent?
the rite of passage is deleting all mods from addons to avoid peer tool script mismatch, because workbench/peers don't listen to startup params
wasn't 1.7 supposed to be the magical update that would bring performance and stability to refrogger ?
they did do a cool trailer tho so i guess it's okay
It's not 1.6 nor 1.7, it's 1.67
Uh no
They do and have for literal years.
Unless that's specifically something that 1.7 broke.
They seem to ignore -addonsDir when you have one dir used for development, and another dir used for normal gameplay
no
My AF Tools start up:
It prioritizes the game addon directory
savior
my addons is also under the D:\ location in picture
This is for Arma Reforger game:
Just don't have a downloaded copy of the mod in your game addon folder and you won't get mismatch errors.
I have just had issues with mygames folder being unkillable regardless of how I set my options, maybe it is a skill issue after all, but I am very much aware of how they should work, and have seen it not work because you can load a mod from one directory with mods from another directory in the workbench itself, while peers do not seem to like that
This
yes try my methods above for Tools and the Game, they remove them from Documents/My Games/ which OneDrive loves to sync
incorrect, look at the drive path
Redundant for him, unless he specifically has them somewhere other than the default location.
Had one, until the game decided mods I deleted were not deleted and couldn't update or clear anything
What are you talking about? Those params change the default location for the game and WB files so it never touches the OneDrive linked /My Games/
Requiring him to move all of his files right?
personally have had few issues with one drive, but digress - I reported an issue a while back and wondering if anyone wants to help repro - game crashes when a turret that worked in 1.6 is spawned
correct. Drag and drop
Sounds like a way more effort than simply deleting a single mod from the games addon folder.
I had this same issue with the default location, along with WB pauses and crashes:
Quick question if i wonna create a trigger and set it radius and i wonna show that radius in debug view in editor how can i do that ?
Also is it possible to show debug shpere in the view after the game has started ?
@river imp try removing -nobackend if you use it
Thanks for telling me what I just told you.
I used this as I modify building disassembly time based on x condition. Just override and do what you need to do.
event float GetActionProgressScript(float fProgress, float timeSlice);
Hi all i have a problem that has just popped up tonight and i have never had before i get the following error on my script componet -
SCRIPT : SCRIPT : Compiling Game scripts
INIT : Workbench Create Game
SCRIPT : Compiling Game scripts
SCRIPT (E): @"Scripts/Game/LGTW/AI/LGTW_CounterAttackVehicleSpawnComponent.c,1": Unknown code
SCRIPT (E): @"Scripts/Game/LGTW/AI/LGTW_CounterAttackVehicleSpawnComponent.c,2": Broken expression (missing ';'?)
SCRIPT (E): @"Scripts/Game/LGTW/AI/LGTW_CounterAttackVehicleSpawnComponent.c,2": Broken expression (missing ';'?)
SCRIPT (E): Can't compile "Game" script module!
Scripts/Game/LGTW/AI/LGTW_CounterAttackVehicleSpawnComponent.c(1): Unknown code
SCRIPT (W): Failed to load
PROFILING : Compiling Game scripts took: 465.858100 ms
ENGINE (E): Unable to initialize a game/gamelib. Some workbench features will not work.
SCRIPT (W): Initializing default GameLib's game class.
INIT : Creating game instance(Game), version 1.7.0.41 built 2026-05-11 20:04:25 UTC.
ENGINE : Game successfully created.
PROFILING : Workbench Create Game took: 633.247300 ms
DEFAULT : Using thumbnail cache directory: C:/Users/tyler/AppData/Local/Temp/Arma Reforger Workbench/Projects/LetsGoToWarPVEFramework/thumbnails
BACKEND : Attempting online Game Config instead.
DEFAULT : Using autosave directory: C:/Users/tyler/AppData/Local/Temp/Arma Reforger Workbench/Projects/LetsGoToWarPVEFramework/autosaves
PROFILING : Workbench startup took: 6966.654200 ms
DEFAULT : Checking pending workshop invites...
Disregard my post everyone i had another file that was incomplete
On your trigger entity select draw shape
How do I "drag a Layer" and "drop it on the area in the Hierarchy panel in order to have it as a child entity of the area"?
I think you may be misreading something here. I believe this exact stuff is from a BIKI guide?
Those layers will not go onto an entity, it is the other way around. Only other entities can become children.
Yeah, it's BIKI stuff
Ah, it does say Layer. That is going to be a prefab in your resource browser. The yellow/blue/red layers are organizational hierarchies for world builder. Look for layer.et
Oh lol, I just realized that as well 😂 Was very confused for a moment! Thanks 😄
I'm working on a script based addon. Is there a way to make my addon wait for the game to load and settle before initializing?
I just don't want to pound the server as it's trying to start.
I could have sworn I've seen it done, but can't recall where and my google fu is weak apparently.
@gleaming lily
Dont mean to @ you normally, and I am not sure where to report this. This will be affecting vanilla gameplay. I am hearing that players will disconnect when killed by FIA in order to prevent them from scavenging their gear.
i think you mean @minor agate
honestly i dont think this is the right approach either way. try https://feedback.bistudio.com/project/view/66/
I am not even the one to report AR gameplay issues 😅 . I don't work directly on AR on those things
use feedback tracker please
WB Events
howdy folks!
Quick question here. Seems like my WB has been corrupted somehow.
It shows errors like this.
Is there a way to fix it? thanks in advance
It marks AudioSystem.PlaySound as unknown method 😮
and also
since when they are unrelated?
We have made some first round of changes to serialization contexts, and 1.8 will include another big refactor to offer more features at less runtime cost and less code. Ideally in your code you only want to refer to Save/LoadContext as well as the concrete types such as JsonLoadContext
oof. No backward compatibility then =((((
each time you guys release updates I need to deal with depression 😄
We have provided a full file in the release to make it as backwards compatible as possible. If it does not work for you then you were probably referencing things by more or less internal types which should not have been used in the first place.
thank you! I'll take a look
Hopefully I'm not using serialization widely
I'm wondering what's wrong with AudioSystem.Playsound method
thanks!
so I have basically changed BaseJsonSerializationSaveContainer to JsonSaveContainer
//BaseJsonSerializationSaveContainer jsonContainer; // commented this
JsonSaveContainer jsonContainer = new JsonSaveContainer();
Hope it will do the thing
But I still don't get why I can't use AudioSystem.PlaySound in CallLater function anymore =(((((
You do not and should not manually setup any containers, use the full preset contexts. Containers are removed in the next big version. Json/Binary/Script-Save/Load-Context will remain.
How do I need to save things into json then?
JsonSaveContext context(); context.Write(xxx); context.SaveToString()
thanks! will take a look.
yep, in Load I'm using
SCR_JsonLoadContext reader();
reader.LoadFromFile("$profile:/Kuzma/globals.json");
reader.ReadValue("", g);
HOW???
class MyClass {
protected int value;
static void F() {
auto value = new MyClass();
value.value = 0;
};
};
scripts/Game/MyScript.c(6): error: Trying to access non-static member 'value' from static method 'F'
Are jsonapistruct still a no-go?
They're the most convenient and elegant way of serializing object
Definetly not, they rely on a fixed structure and you have to manually set it up. Also it does not support all variables types. Save/Load context automagically supports writing whole object hierarchies with polymorphic collection types, skipping default values to keep the json slim etc.
🥺
Your local variable value is colliding with the class one. Member variables should be prefixed by m_ to avoid this. We do not do it out of boredom in vanilla scripts.
Want to force this naming style? Then simply throw an error about a missing prefix in the variable declaration and not random error of some name collide when every other language allow this
No we do not force anything, but you can not expect ambiguity to work.
it's not ambiguity, we have this
That would allow you to explicitly favor a class member over a local variable, but you named the instance of the class the same as the local variable and then the class member is also the same. this will not help you
conventions are conventions
if I want access class member instead of local variable then I use this its helps
In script editor im not getting a single error. But in Main workbench log it says:
Types 'KUZ_ScenesEntry' and 'KUZ_Task' are unrelated for the code below:
KUZ_Task GetTaskByTitle(string title)
{
foreach (KUZ_Task task : m_Tasks)
{
if (task.m_sTaskName == title)
return task.GetTask();
}
return null;
}
GetTask is a function from KUZ_Task:
KUZ_Task GetTask()
{
return this;
}
And as I said, no errors in script editor.
And I can't load my world because of instant crashing =(((
sorry for annoying questions, but could someone point me where to find a solid tutorial on how to detect crash reason of Workbench?
thank you in advance
ps. I've been working on my mod for more than a year. So it makes me really sad that a single update can ruin the whole work 🙁
press send and copy and ping some bi devs here with provided id)
thanks!
for example: #enfusion_scripting message
oh! cool, thanks!
probably need cast inside GetTask
need more code to figure out
Regarding the issue that vlad pointed out, it seems to me the engine is either confusing contexts or is performing a Class vs. Static scope check too early.
Im not sure whether the scope check is performed on value. or .value, but it is out of order somehow.
class MyClass {
protected int value;
static void F() {
auto value = new MyClass();
// value. is in local scope
// .value is in instance/object scope
// value. should match first with local scope, not Class vs. Static scope. I am guessing it incorrectly prechecks here
// .value should use the instance/object scope, so it shouldn't even perform a static/class check.
value.value = 0;
};
};
@pliant ingot Does this only happen when using auto value = ...? or does it happen when using MyClass value = ... also?
I wouldn't be surprised if the auto type somehow causes the engine to skip or misorder the scope checks.
Doesn't matter, problem in thing introduced in language with 1.7, so function arguments/variables and class members can't have same name
yeah. The crashing reason is all about Types 'KUZ_ScenesEntry' and 'KUZ_Task' are unrelated
but I don't get what's wrong with this code =(((
Also, after the recent update I can't use GetGame().GetCallqueue().CallLater with AudioSystem.PlaySound anymore
There is an issue here, but after thinking about it... You would only run into this issue if you are naming your variables poorly.
In the given example, i would have this clear naming convention:
MyClass parentMyClass = new MyClass();
MyClass childMyClass = parentMyClass.myClass;
You found an engine issue, but its easily fixed by renaming your variables OR avoided by naming your variables well the first time.
I encountered this issue again, now for basic string type
hm, I could just return task without the GetTask func..
One problem less 🙂
Now only CallLater with PlaySound error remains
Bro's screenshot is only missing comic sans to be super cursed
i dunno if it's the issue bc you didnt provide the line numbers, but seeing there's name conflicts in 1.7: WB might throw a fit at lines 27 and 88 (KUZ_ScenesEntry)
sorry! I've changed it already. I could just return task without using GetTask here
and now there is a new problem =(((((
Reason: Failed move from <3827.89,4.36141,1435.78> to waypoint <3826.46,3.054,1445.15>
<0x00000290EA8EA130> SCR_AIGroup : AI/BehaviorTrees/Chimera/Group/ActivityMove.bt
AI/BehaviorTrees/Chimera/Group/MoveToLocation.bt (RunBT : ID 21)
AI/BehaviorTrees/Chimera/Group/Group.bt
(RunBT : ID 18)
AI/BehaviorTrees/Chimera/Group/MoveToLocation.bt
SCR_AI Process Failed Movement Result : ID 25
Function: 'NodeError'
Stack trace:
Scripts/Game/AI/Utils/NodeError.c:8 Function NodeError
Scripts/Game/AI/ScriptedNodes/Groups/SCR_AIProcessFailedMovementResult.c:228 Function NodeErrorOnce
Scripts/Game/AI/ScriptedNodes/Groups/SCR_AIProcessFailedMovementResult.c:99 Function EOnTaskSimulate
Scientists have confirmed that every new Reforger update takes 10 years off your life
(but fps became much much better tbh)
People in the terrain channel who had this error, did not have their navmesh setup correctly
oh thanks! It used to work well before 🙁
upd. all navmeshes are gone! 😮. Regeneration is needed
does anyone know how to find the actual thingy
im making a new project
and for the life of me i can't find it in script editor
i cant find the folder to make a new script in
The message does not really say more.
But basically, regenerate the navmesh make sure they are set in the SCR_AIWorld and it should work.
#enfusion_terrain message
Yep! Sorry for deleting the previous message. I've just found out that I didn't save my generated navmeshes
thank you anyway!
Open it via resource browser, or Projects in script editor
After struggling with the modding tools for the whole day, I finally managed to create a scripted test action that works 
how do we launch game from WB to see our new code and test it without needing to restart the game? Mario mentioned this is possible, is it just starting the debug version of the game?
I thought I managed to fix all issues. But then I've added a single line, just Print() into scripts, and now, each script reloading ends with crash
I know. I did
I even removed this Print line from the code, but it still crashing
which one you are asking about?
I couldn't catch it, because wb is being crashed
maybe some memory issue
nothing here. Crash happens only when I reloading scripts, while my world is loaded
oh i see what you mean, it just crashes the whole WB
Run diag exe with -debuggerPort 1234, open Script Editor, in top menu open Debug/Debug Custom, enter port and now you can use breakpoints, watch, logs, remote console...
I have this, but I just ignore it
Load WB and only load the scripts, force a validate and reload. If it isnt crashing, it might be the world? That assertion error comes up for me every now and then and i dunno what for
nope. It compiles ok
and I tried to compile while world is loaded. And it allowed me to compile once 🙂
I guess it's an OOM issue, probably
my droog, the solution is simple: cast WB back to the land of crystals 😄 Not sure what it could be, especially if it recompiled OK
thanks anyway!
You could ask Arkensor or MarioE when they're around, might be a new bug?
i dont... see it
its
where is it???
this pops up for me everytime i reload scripts with a world open, its somewhat annoying but harmless just click retry.
my stuff is in resource browser
yep. I usually ignore it
but it doesnt show up in projects in the script editor
from the World Editor menu, or within Script Editor in one of the left window tabs. Your_Mod/scripts/GameCode/ is the directory the game will watch
but maybe after the recent update OOM issue became more important
do i have to make the folder myself?
in file explorer
you can make it inside Workbench in the resource browser
okay i've made the directory
but
they also need to automatically add the stupid "PLACEHOLDER" image by default instead of having us manually add it in EDIT: created https://feedback.bistudio.com/T199574
take a screenshot of it in resource browser
You're trying to make a new .c file for that mod, and using the mod as a dependency?
im making a new mod called ace_medical_temperature which uses the other ace stuff as a dependency
not game
whats the difference between game and gamecode?
GameCode holds the actual .c scripts you are creating
so should the folder be called game or gamecode
@minor agate sorry for disturbing, but if possible, could you please provide some info regarding this crash. Thanks in advance! 4b07244b-64a6-4c93-a9fa-63e0df032eb3
im really sorry im not the brightest
GameCode. The Game folder is for other items
okay
how do i create a new script in the gamecode folder
as currently it still doesn't show up in SE
open GameCode/ and right click > new .c file or whatever the option is
and this has to be done in a file explorer???
no, workbench resource browser is fine
theres no create new c file though 😭
click on free space in resourse browser
and script
it's ok. You just need to get used to the new IDE
do you know OOP like C++/Java
java yes
ok, was about to say need to pour some wine or bourbon and start learning 😄
It was not easy for me to switch from GoLand to this
tysm for helping couldnt find a single useful piece of documentation or a tutorial 😭
you didnt watch the bootcamp?
theyre on YT, itll show you general use of WB including SE
+1 for the bootcamp, great way to start learning
gotchu
i just didnt see a tutorial for like scripting specifically
ok, it keeps crashing just too much for me in different ways. I hope devs will deploy a hotfix soon
so enfusion script is like a mix of c++ and java, not everything in those languages will carry over directly
Attributes make it looks more like C#
second bootcamp video i think, and the Rpl ones, and the Wiki: https://community.bistudio.com/wiki/Category:Arma_Reforger/Modding/Scripting
Use this for very basics: https://community.bistudio.com/wiki/Arma_Reforger:Scripting_First_Steps
I load my world. It's being loaded just fine. Right after this I'm trying to load it again - and it crashes 😮
afaik, Game for universal for any project gameplay scripts (in threory at least), GameCode for scripts that shoudn't be used outside current project (project = game, so reforger specificly)
Load a different world and see if it still crashes?
Check your workbench log folder for any errors before it crashes
im just... gonna put it in game
thanks for your input
yep. Just tried to load Cain twice. On the second try there was crash
most errors I have are like
Wrong GUID/name for resource @"{536BF67B2052B869}material/metal.gamemat" in property "UTM_CityMap"
but i don't think that it's the reason
Haven't found anything 🙁
yeah, 99% its should be in Game
Cain crashes too. And other worlds as well 🙁
And I suppose that the root issue of script crashing, is somehow related with reloading the world
do you have mods loaded or is this vanilla?
only mine
Iirc, Game and GameCode are the same.
load vanilla without any mods and see if it loads without crashing
Checked. Nope, vanilla doesn't crash
Then something in your mod is causing your wb to crash. do you have custom scripts? specifically code that runs OnPostInit?
module is same (at least now), but logically: #enfusion_scripting message
oh, I have a lot of custom scripts. But I will check if I'm triggering OnPostInit somewhere. Thanks for a hint!
There's only three times in code I'm triggering OnPostInit
I was able to reload my world three times in a row this time 😄
Before it has been crashed
Them being the same kinda negates any logic lol. Regardless does adding our own work now?
I don't try to add custom modules/pathes/entry points, so can't tell
How do I pull from the character in a script?
like
how do i make it so it takes the character as an input
Last I tried there were compile errors.
I only add to GameLib and now Autotest modules, first one if fail to compile fail to launch entire WB and can't reference code from Game
you mean GetGame().GetPlayerController() ?
um
it's not "official")
ah i probably got GameCode as being the only mod script directory from this line: https://community.bistudio.com/wiki/Arma_Reforger:Scripting:_Best_Practices#Files_Organisation
Its hard to diagnose without understanding the full context of the system you have built, it may just be a workbench issue but the fact it doesnt crash when you spam reload with no mods makes me think something in your mod is causing the issue. Start by disabling your custom components in your world. But you did mention it did the same thing when loading cain which shouldnt have any of your assets loaded in. Most likely its a gamemode component you have overridden or something similar.
Yep, but vanilla worlds are causing crash too
with no mods loaded? you said above it was working fine
with mod, but loading just a simple vanilla world
emptycain for example
UPD. tried to reload emptyCain for several times. No crashes, yet
I'll try to load my world but completely empty
it doesnt matter what world you load, (unless its literally empty) your overridden prefabs will still get loaded in if for example its a gamemode override.
reloaded my world with almost empty layer (only some basic things here)
And it works well. Scripts are reloading, world is reloading too. Probably the issue with some corrupted entities 🙁
Thank you for your time anyway!
you can split your objects into multiple layers then remove them from file explorer one by one to narrow it down. Then just put back in when done
yep. I'm trying to add all layers one by one to locate where the problem is
Both game folder and gamecode folder fall within game module
Game folder is purely scripted
Gamecode folder contains generated scripts from CPP
Both are reforger specific
Gamelib is from.enfusion and it is game agnostic utilities
Core is from enfusion and it is engine utilities
CallLater and AudioSystem.PlaySound issue is very annoying =(((
Right after the recent update - it suddenly stopped working 🙁
Make feedback tracker ticket
This is wrong lol. See my comments above this one
I think there was confusion on those docs when being written and they meant gamelib instead of game
And game instead of gamecode
done!
Sent over to Wiki channel for update/review
Would it be easier to manually increase the fuel level of a gas tank by checking its fuel every 10 seconds and += if its fuel level is less than an amount, or using SCR_ResourceComponent
do not browse the doxygen in a dark room and hit ESC
Why would you need to check it every x seconds
Why not use the script invoker?
Unless the thing you're talking about doesn't use a SCR_FuelManagerComponent
It will regenerate fuel at MOB in a designated depot if its <200g
SCR_ResourceComponent looks uh, like a PITA
Is there any way to check the location of a given entity?
For example the height of a player
yes their vector, it returns <x y z> or the like with GetOrigin() i think
enfusion vector =/= c++ vector
yes! that worked like a xharm
tysm