#Soph's grand battle against Enfusion

1 messages · Page 1 of 1 (latest)

hardy musk
#

Feel free to follow along as I probe my sanity while attempting to create a seemingly simple mod utilizing vanilla assets.

== Current Battle ==
-Research and implement action to encampment radios (Upgrade/Destroy)

The current objective is to create a prefab that can be placed by a construction truck, built, and when: enough supplies are present AND the player is above a certain rank an action will be available (centered on the radio) to upgrade the prefab to a different prefab.

The idea is that squads can set up a point that isn't capturable that they can spawn on and call cars (both supplies permitting), but it can be destroyed by the enemy. Once the squad has a leader that's a high enough rank, that player can upgrade the point to a capturable one and it can no longer be destroyed. This is all in an effort to make conflict mode more organic in that only objectives such as key infrastructure will be present at the beginning. Sides will decide where to place a limited number of bases and progressively take control of the map. I call this new mode 'eCTI' (enfused Capture The Island).

quiet sleet
#

have you tried editing the prefab that the "E_"was generated from? and then regenerating the editable entity?

hardy musk
#

Yes. I duplicate the editable prefab to the mod, make the changes to it, save-- If it's even called that, and it still reverts. There has to be a link somewhere and I'm just not figuring it out

quiet sleet
#

the one that you are attempting to edit inherits from a base prefab

#

try duping the base prefab compostion and then remaking it editable? (extra steps i know)

hardy musk
#

In this instance I'm modifying E_PlayerHub_S_US_01 into something but I should instead duplicate PlayerHub_S_US_01 and modify that (also make that composition editable)? I'll give it a try tomorrow if that's the case.

quiet sleet
hardy musk
#

I've gotten past the file wanting to revert by doing the above but now I'm not able to see it in the entity browser as a GM. I've updated the placeables config for the mod, verified that it's listed and is the correct path inside the config file, and verified that it's in the SCR_PlacingEditorComponent registry of the EditorModeEdit... What am I missing?

#

And checked to make sure that the prefab has an SCR_EditableEntityComponent:

quiet sleet
#

does it have an rpl?

hardy musk
#

Yes. After several comparisons and a series of trial and error I discovered that the authorized label "Static_Composition" somehow caused it to not show up.

#

The next order of battle is making it so that the composition shows up in a construction truck

quiet sleet
#

that is a battle

#

ik you need an editor link on your entity and a duplicate of that entity with a preview entity component.

#

and i think you add it to freeroambuilding config

#

but im sure im missing something

hardy musk
#

Any tutorials on that I can follow? I'm not seeing any on the BI wiki

quiet sleet
#

not that ive seen

#

i dont think the plugin does it the whole way either. ive just been piecing it together by looking at vanilla assets

quiet sleet
hardy musk
#

That order of battle is shelved while I attempt to figure out what I'm doing wrong to generate a preview picture. I've opted to do it manually sense none of the 'automatic' features have worked thus far.

quiet sleet
#

tactical retreat

hardy musk
#

IN YOUR FACE ENFUSION! I at least got a win! Now that's settled the focus goes back to adding the composition to a construction truck.

For those curious about the VERY long process in creating a preview image manually:

  1. Take a screenshot of the asset somewhere
  2. Select a portion of that screenshot that adheres to the 4:3 ratio (in my case I selected a 2000 x 1500 portion; reduced it to 20% to get it to 400 x 300 and saved it as a .PNG)
  3. Import the saved image in your mod folder (I created an overly complicated UI folder tree that mimics the ArmA folder... that part not recommended; just have one folder.
  4. Add the image to the SCR_EditableEntityComponent and-- violent! (or voila whatever it is)
hardy musk
#

Breakthrough! The composition has to be added to EditorModeBuilding.et to be buildable but adding it directly skips the whole build action sequence part.

#

I just need to adjust labels(?) to put it under the correct tab... looking into it

hardy musk
#

there has to be some sort of debug messaging

hardy musk
#

I found something about layouts, still looking into what they are and how to link them to other prefabs as the prebuilt stage.

quiet sleet
#

Dupe the E_entity and call the dupe preview. Add preview entity component. Then go look up another build comp and it's preview and match their flags

hardy musk
#

By looking into what references the FRB_* layout entities I found CampaignBuildingCompositionOutline.conf but simply adding a new entry isn't the solution. There must be a component that I'm missing

#

I'm not going line by line through SCR_CampaignBuildingCompositionOutline to see if I can find a clue to what it's looking for

hardy musk
#

From what I can tell the script just looks into the manager, grabs the corresponding name, slot size, and layout. No clue on why the game still places the finished composition rather than the layout composition.

hardy musk
#

I've figured out that the labels in the SCR_EditableEntityComponent correspond to certain tabs in the build menu. trait_service puts it under the first tab with the arsenal, light/heavy vehicle depots, helipad, fuel depot etc. but for some reason everything is also duplicated to the (assuming) object tab as well.

#

Trait_base puts it in the last tab but it's all still showing up in the (still assuming) objects tab

#

This is the icon for the assumed object tab, it's listed as "single_object" in the imageset

stable arrow
#

I dont know correct names and im on phone so i will wing it now.

I duplicated e_bunker.et from editablePrefabs folder and then I basically just added antenna to it and a jammer component. Then i changed the settings in component where you set pictures and name of building. And it kinda works😂

#

I have no clue why this is so so complicated

quiet sleet
#

U need a preview entity so the editor knows what to show as an unbuilt ghost. Duplicate your edible entity and add preview entity component. Point your first editable entity at the preview entity in the editor link component. On the preview entity make sure that it's editable entity component is editor only. Some other steps I don't remember rn

hardy musk
#

I'm also confused about using the EditorLinkComponent. I linked everything then when I placed it there was two of everything.

quiet sleet
#

The editor link just points at the preview entity

hardy musk
#

Getting there. I changed all to 'Editor Only', unchecked 'Traceable', 'Visible', and 'Static' (if applicable) to all of them and even their children. Enabled the link component. And now when I place it it shows nothing. BUT THAT'S PROGRESS! How you might ask? Because when I drag it (and I can even drag it now) after it was placed it changes to the layout entity that I made for it! There's a small problem though... It brings in the Czech hedgehog. It can now be built. But not all the layout disappears after being built.

Still-- It's progress!

hardy musk
#

Now I got everything to disappear that needs to disappear when it's built. Now to figure out why I have to drag it after placing to be able to build it, why it shows a ghost Czech hedgehog, and why the amount of building isn't what I set for it.

quiet sleet
#

the preview entity is how the editor generates the preview you are missing...

#

and i am not talking about the place holder picture

#

for clarification

stable arrow
#

Yesterday i was trying again to make my mod work.

I tried making it from non editable prefab and then make it into editable prefab with that plugin. The problem is that things that I added to prefab doesnt appear at all when i olace it down.

#

I have no clue what setting is wrong. Its still funny that the one where I added antenna to editable prefab works. But antenna stays in the middle of prefab and i cant move it around.

hardy musk
# quiet sleet that link component needs to point at the preview entity....

All the examples I've come across have all the child entities as 'editor only' with the core entity having a "SCR_EditorLinkComponent " with entries for all the entities. This was why I was unable to delete the components in the beginning: I was only deleting the child entities without deleting the entries for the corresponding children in the editor link component. It also explained why there was two of everything when I initially placed the composition down, and why the icons for the entities in the hierarchy browser was different to the examples I was looking at.

Last night I was messing around with the preview components and found that one of them is the preview/ghost representation for placing the composition but I'm still looking into it.

hardy musk
stable arrow
hardy musk
stable arrow
#

For me only those that are not editable(blue ones) dont show up when i place it down

hardy musk
#

Place down how

stable arrow
#

They should make official tutorial for these brother. Its crazy that there is basically 0 info about it.

stable arrow
hardy musk
#

I don't think the blue ones should be added to configs for them to be placed. Only editable prefabs have been the bulk of what I've seen as placable.

stable arrow
hardy musk
#

The component that lets them be placed is the SCR_EditableEntityComponent component for the core entity. Make sure under flags that "Placeable" is checked and none of the authorized labels are "Static_Composition" (which a script deliberatly overlooks those with such a label)

stable arrow
#

Yeah and that component get added after you change blue prefab to orange one with plugin

stable arrow
#

@hardy musk Bro I figured out how to make this now but I don't know how to write it out 😄 .... When you have time hit me up and I will stream to you or something

#

it also appears in command truck. The only problem I have right now is supply cost for it but I think I know how to solve that

stable arrow
#

can i stream in this server

hardy musk
#

good question

quiet sleet
stable arrow
#

@hardy musk have you figured it out. For some reason now when I add jamming component to prefab it doesnt work and I dont know why it does that and I also have no clue howbto set action to make it toggle on or off

hardy musk
#

I cleared out all the previous versions and examples from the mod folder to start over but the issue of getting the layout prefab to appear when placed and for the preview 'ghost' entity to show up instead of the Czech hedgehog is still an issue. I backslid a bit like I said and had to redo the layout prefab but now the entities don't rotate with the core entity.

As far as adding an action to turn something on and off I would look at the mobile light composition pictured. You might be able to use the light switch action as an example to go off of.

stable arrow
#

I tried but I think component needs to have something about actions too. Atleast that's how music radios work

hardy musk
#

I'm at a loss, I don't know anything about putting in custom actions. All I can suggest is looking into the component for where "Switch" is referenced and see if there's any scripts called or referenced to it.

stable arrow
#

I will seek some help from drone mod creator

#

No worries

hardy musk
#

This is frustrating. I had everything working except for the 'ghost' composition that was the preview. Now I'm fighting the layout to make it rotate properly and to disappear when the composition is built. It seems to be mutually exclusive at the moment. Adding a 'Hierarchy' component makes the entities disappear but they no longer transform like the old trench poles... They must be magic

stable arrow
#

I dunno why your build doesnt work with my method.

I suspect there is somehow problem with that plugin that makes editables from regular prefabs

hardy musk
#

It may have been that you didn't make a completely new composition with entities all over the place. You just duplicated what was already existing and it seemed to have just slapped trench poles all around it; possibly with a Chech hedgehog in the center.

stable arrow
#

there was no hedgehog on my composition. you can check out here. Can you tell me exactly which composition you tried duplicating and it didn't work

hardy musk
#

PlayerHub_S_US_01.et

#

I duplicated it to the mod folder, renamed it Encampment_S_US_01.et.

#

Moved bits an pieces around as well as added more

#

Then made it an editable through the plugin

#

Not all entities were made correctly so I made changes to them ("editor only" and the like)

fallow birch
# hardy musk I'm at a loss, I don't know anything about putting in custom actions. All I can ...

I know it's probably NOT like Arma, but to have a "continuous" rotation of such radar in Arma 3, I had to set a kind of a loop.
It was like this:
while {true} do { radar1 animateSource ["Radar_Rotation", 1]; sleep 7; radar1 animateSource ["Radar_Rotation", 0]; sleep 7; };

So maybe if we find this kind of loop in Reforger's actions... perhaps an extra "Parent list" on that "Additional Actions" down there, linked to a third action that set the animation to OFF... 🤔
Your idea's just great to have such nice touch on the scenario. I will try to mess around with that as well, to see whether I can bring some better news for you.

stable arrow
# hardy musk Moved bits an pieces around as well as added more

When you are adding more pieces, you need to make sure that prefabs that you are adding have same piece in editable prefabs. If same part is not in editable prefabs you can inherit that prefab and make editable version with plugin and then add it in.

Make sure that when you are editing playerhub it is not editable version PlayerHub_S_US_01.et

If you had to make those changes(editor only,...) that means they dont have editable version.

For example you want to add to your playerhub a prefab named WoodenCrate.et, you need to make sure there is E_WoodenCrate.et in EditablePrefabs folder.

I know my message is confusing but I dont know how to explain this any better in text. I can always turn on stream and show you that way, just ask.

quiet sleet
hardy musk
#

The problem right now isn't making the prefab editable, it's to make the layout for the editor mode to be placed correctly and for there to be a proper 'ghost' representation when the player has the e-tool in hand.

hardy musk
#

I've updated and published the mod and now there is an accurate 'ghost' representation but the pieces don't rotate properly. I even discovered that ALL VANILLA compositions are doing this too. Did I break something or is this something everyone else experiences?

stable arrow
#

For me it works like its supposed to. I have also managed to create drone station with some custom prefabs and it shows up and works like its supposed to

#

You can spin it and everything. For all I started with Bunker prefab and edited that.

#

If it was me I would create new project and check if it will work

hardy musk
#

Well... I'm just going to ignore it for now. Everything is working fine but that-- which is global and not specific to my mod (I've even deleted it tried it-game).

river sorrel
#

Hello. Where exactly is this Ghost Preview specified, or which component is it in? I have been searching for this myself for a while now. I am trying to get FRB working, I have custom prefabs filling my menu but when I place them to get built, no Ghost Preview. Thanks in advance for any help!

stable arrow
stable arrow
#

@river sorrel hit me up when you can and i will try to explain how to do it on stream

hardy musk
# river sorrel Hello. Where exactly is this Ghost Preview specified, or which component is it i...

I refer to the prefab representation that is only visible during the edit/build mode and when you have an e-tool in hand as the 'ghost preview'. I'm not certain what defines it but suspect it is the editable entity itself as all entities are made to be 'editor only'. As far as a layout prefab being placed prior to building the prefab: Just add the built prefab and the layout prefab in their respective places in an entry into "CampaignBuildingCompositionOutline.conf". Make sure the layout entity has the "SCR_CampaignBuildingLayoutComponent" and that each child entity has a "Hierarchy" component.

river sorrel
#

Hey y'all, thanks for the replies. My Outline Manager was null lol that was the issue! Once I defined the slots it worked like a charm.

hardy musk
#

I got all the basic prefabs completely built and published on the test mod. Now comes the part of adding an action to upgrade the encampment; something I know nothing about.

hardy musk
#

While I dove into creating the eCTI scenario I noticed that the entity that is placed somehow generates a base with the HQ tents as default. The FIA HQ tents are used for uncaptured points but for a completely organic game there needs to be a lot less- like flagpoles showing who owns the point. Checking for what references the entities have produced nothing thus far.

hardy musk
#

The translation is in the faction configs. I've successfully changed it so that only a flagpole is present but I've suspended working any further on it until the 1.5 update; to see how conflict changes.

stable arrow
#

@hardy musk Hello bro,
Sorry for ping but I would need and appreciate your help. Im trying to make some additional fortifications for conflict and I forgot what I did the first time. I can't get them to appear in Game Master or build menu on command post