Allow prefabs to be used in entities ( for custom weapons, vehicles etc )

Main Suggestion

so, today i come with another suggestion that will make modders lives 100% simpler ( if … possible to begin with )

and that is, allow prefab to be used through entities, and allow the possibility to create / modify prefabs through entities.

why?

well, as some of us loves to create custom vehicles and weapons;

such as:

vehicles:



( followings are made by the talented @Vik_2701 )





guns:

Glock:

m14:

Mac-10

As-Val ( of @124138805 )

Etc.

but, the problem that we have right now,

is that, the only way for us to attach things onto others, is a very long, and time consuming process.

of having to modify one rendinst at a time.
with axes being effed up every time.

like:

( btw this is relatively simple, even though it took me 35 tries across 2 hours. mainly due because the scale was inverted, and the axes all different from the universal 0 Y Z X )

Code
dreyse_m1907_gun{
  _override:b=yes
  _extends:t="equipable_gun"

  "attach_decorators__entities:list<eid>"{ 
  }

  "attach_decorators__templates:array"{
    "attach_decorators__templates:object"{
      relativeTm:m=[[0.0467371, 0, 0] [0, -5.5053e-09, 0.125947] [0, -0.462524, -2.02175e-08] [0, -0.00326478, 0.00133297]]
      template:t="myRendinst+item_in_world"
      nodeName:t="gunFx_main"
    }
  }
}

myRendinst{
  _extends:t="game_rendinst_decor"
  ri_extra__name:t="ammunition_box_d"
  ri_extra__hasCollision:b=no
}

so, it would be much simpler and easier if we could integrate somehow rendinsts onto one prefab that can be used through entities,

and modify only one parameter. the prefab it self with all the others rendinsts / objects attached to it, rotating / scaling / moving along side the prefab alpha ( which essentially will change everything underneath that prefab.

because on top of being tideous and the process being long, you also have the problem of having axes inverted, and the trivial task of trial and error 246times just to get the correct position that doesn’t look odd is super annoying and once again, time consuming.

Example of how it should work:

( keep in mind, doesn’t have to be final. just to show how it would be supposed to work )

1: i go in the game, create cosmetics and various custom made stuff that you want to apply onto an existing vehicle

2: select all objectis that you made:

3: create a prefab:

4: Select the prefab, and create a node in the entity node:

Prefab1{
prefab__id:t="3"
relativeTm:m=[[...] [...] [...] [...]]   // Initial Position. ideally, should be on 0, 0, 0.

  "attached_Object_List__templates:array"{  // All List of Attached Obecjet, which you can add / remove if needed. but, best if you do that inside the game rather than here
  object_1:t="stalingrad_drama_theater_ground_cover_b"
  object_2:t="stalingrad_drama_theater_ground_cover_a"
  object_3:t="japan_tractor_model_92_glass_front"
  obkect_4:t="[...]"
  // Etc. Up until there list will be done
}

5: Apply it onto a vehicle

gmc_353_custom{
  _extends:t="gmc_353_a"
  vehicle_seats__exitTime:r=0.66
  vehicle_seats__enterTime:r=3.2
  vehicle__mapIcon:t="map_icon_train"
  user_point__icon:t="map_icon_train"
  team:i=2
  vehicle_seats__autoDetectRestrictToTeam:b=no
  vehicle_seats__restrictToTeam:i=2

  "vehicle_seats__seats:shared:array"{
    "seats:object"{
      name:t="driver"
      locName:t="vehicle_seats/car_driver"
      seatOwnsEntityControl:b=yes
      attachNode:t="char_driver_pivot"
      entranceNode:t="char_driver_landing"
      attachTm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [0.0, 0.0, 0.0]]
      seatComponent:t="isDriver"
      nextSeat:t="passenger1"
      canPlaceManually:b=yes
      seatEnum:t="left_seat"
    }

    "seats:object"{
      name:t="passenger1"
      locName:t="vehicle_seats/shooter"
      seatOwnsEntityControl:b=no
      attachNode:t="char_passenger_01_pivot"
      entranceNode:t="char_passenger_01_landing"
      attachTm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [0.0, 0.0, 0.0]]
      seatComponent:t="isPassenger"
      nextSeat:t="passenger2"
      canPlaceManually:b=yes
      seatEnum:t="right_seat"
    }
  }

  "animchar__objTexReplace:object"{
    "gmc_cckw_353_tex_d_tomoe*":t="dirt_tile_floor_tex_d*"
    "gmc_cckw_353_tex_d*":t="dirt_tile_floor_tex_d*"
  }

  "attach_decorators__entities:list<eid>"{
  }

  "attach_decorators__templates:array"{
    "templates:object"{
      relativeTm:m=[[1.30205e-07, -1.55893e-08, -1] [0.0656765, 0.964341, -6.48199e-09] [0.997689, -0.0679477, 1.30963e-07] [-1.49, -4.6, -0.08]] // Where the Prefab box will be placed, and hence, only creating one decorator
      template:t="Prefab1"
      nodeName:t="emtr_fire_engine"
    }
  }
}

( Note, this method of attaching things to vehicles don’t work on all vehicles. i don’t know why. i’m still trying to figure out what works and what doesn’t )

and there you go, you will have your thing attached with only a couple of tries, instead of having to do everything and struggle for each and single one.

thanks for hearing me out.
doesn’t have to be final, but something that simplify our work would be apreciated.

because it’s driving me crazy trying to get things in the proper way, but coordinates are all different because of the attached node.
and no other solution.

so, would be simpler to make the stuff that we need, and then only use the prefab box to move and the rest will follow.

12 Likes

I would also like to customize the type of weapon in the first person…

3 Likes

Client-Side entities.blk Requested Feature in P0

3 Likes

I prefer that they allow us to import models directly from CRSED or War Thunder.

Considering that War Thunder can import custom models

This is more future scalable

2 Likes

except, it’s a big no momentarely.

as much as i like you dreaming big,

i have to remind you of console limitations.

which… won’t come any time soon. let’s be real.

i too, would love to import things, but it’s also a land mine, as, it would lead to further issues and what not regarding legality of illecit downloaded content, NSFW textures, and many, many other issues.

so, for the moment being, i would love a feature that allows us to build upon existing thing, and through prefab, ease the process.

hold on, what do you mean by this:

1 Like

I think even the official gaijin or DF stuff has enough interesting parts.

For example, the new CRSED hero, some mercenary tycoon~

What you are asking for is actually achieved by defining a new entity template. It’s part of it.

I think as a developer, developing a function to meet multiple scenarios is a reasonable and competitive solution.

well, downloading from one game from another, it’s one thing.

importing custom things it’s another.

hence why i suggested this in the first place:

where there’s a hub and modders can integrated assets from other games.

as long devs supports it, and it’s actually official.

in the sense, that it’s some sort of supervised by someone in the dev teams that reviewd each assets from those games and allows to use it upon our mods.

to potentially filter harmful content or, stuff that is not compatible and would make the mod crash.

so, you’re telling me that i can already group up objects ( rendinsts ) given a position and use them only once as base foundation so that i don’t have to do the process over and over ?

similar to a prefab concept?

and no one told me about it?

1 Like

w h a t

d o

y o u

m e a n

Requested Feature in P0

what does PO stands for.

new template or modify existed tempalte


P0 means Priority 0 (highest priority, I m not sure if this concept is universal around the world for development works)

It’s maybe basically a developer communication concept


We will list different items as different priorities

to determine the order in which these features should be developed.

P0 usually means the most serious problem must be solved immediately…

but it’s currelty not possible.

even if you create a new ones.

there’s nothing that works like prefab in entities.

because perhaps you didn’t understand the premise of the sugggestion, but it’s some sort of " way " to incorporate multiple objects around the base axe in order to not having to do everything from 0.

takings already existing things ( such as this example; )

taking the yellow components:

and apply them onto a car ( for example ):

there’s currently no way to do that.

beside atteched decorators. but that’s time consuming, and axes are differents.

and i’d argue that everything that allows you to save time, it’s a priority.
make things efficent and simplier.

1st, i’m not a developer.

2nd,

wait, does that mean you actually work behind the enlisted editor?

or… you’re a developer in real life.

What you need may be a visual interface to edit these contents. Because maybe you’re not used to writing text code.

But I think this does not affect the form of this function in the program

Obviously this

But I think this concept exists in other industries and it doesn’t really matter.

It’s very common to be a developers as a job in real life.


From a more efficient point of view, developers should provide an entity that defines a polygon for the situation you describe and allow you to edit it, so that it is more suitable for program running efficiency.

Because as in the screenshot, you make a vehicle out of dozens of plank entities, which is a waste of computing resources and has poor results.

Every single entity queueing each tick in the main loop is valuable for performance

1 Like

you’re starting to get under my nerves.

beacuse, as much i’m glad for you:

maybe, consider the fact that not everyone else is.

should i be one for using a game editor?

maybe?

but i’d argue not really.

because if you think that the answer to this question is yes,

then explain what’s the point of having a visual editor if must be all written through a code.

what’s the point of having in game templates if those do not work as intented?

i could list many others editors that i used in the past and had next to no problems compared to the enlisted.

which you might rightfully point out that those are different editors.

which fine, but what’s the point if there are no effing guides for anything either.

how are people supposed to use mods if majority of the knowledge is hidden behind blks and what not that out selves have to go through and analyze by making holes in the water with the whole trial and error.

i’m not asking for others to do our work, i’m simply asking to make things simplier.

as much i’m somewhat learning throuh your, devenddar and others helps, so far, i was able to create unique weapons, vehicles and recolor some clothings. but that’s not enough.

quite frankly, i don’t care whether you think it’s a priority or not,

the fact that has been suggested, and is being liked by others modders, clearly means there’s a need.
and it’s not like we asked this to be a priority.

despite them working on whatever they are, and will hopefully show us what in the upcoming days, that doesn’t disregard others suggestions or make them any less valuable.

okey, this is a valuable informations and something that i can now actually understand.

but at the same time, is it really though?

to take as an example with your opel blitz ( which, i won’t lie. i’m still trying to understand. or maybe, the truck that i used didn’t worked )

you your self, applied things onto others, why would create issues with performance a bunch of rendinsts into one prefab to apply onto vehicles.

those rendists have no collisions.

i don’t undertstand

They will be traversed as long as they are in the queue (in your scene), and computing resources are some kind of wasted.

I believe you have already encountered these situations


template

I’m talking about the functionality itself, but you’re concerned about the visual interface

So you need a visual interface to edit these polygons. And define these polygons into the scene.

I think this can be implemented. For example, export polygon data in text format from a modeling software like blender and read it from your scene.blk.


But obviously they have to implement template related functions first.

Because you have described in the title that you want to use the new things you made, in the entity-template-type attributes.

The things you see in the entity list in the interface are actually templates

This is a more meta concept than prefabs, as you can see you can’t very well copy prefabs and generate them dynamically

This is actually the job of the template.

From a certain perspective, prefab is only applicable to the combination of rendinst.

It is not suitable for defining an interactive entity (such as a vehicle wearing wooden boards).


Also the new guns in your screenshot, in fact these are not the work of prefab.

They should be template in the program, then you can copy and dynamic generated them.

not really.

the only issue that i have so far, it’s in maps made from scrap.

those can sometimes be up to 7 mbs or more, and have some performance issues.

but… to be fair, those do not have battle areas setted up so.
i’m not sure if it will improve the situation.

but, other than that, i haven’t really noticed some performance issues by using heavy templates. ( such changing weapons and stats of vehicles, radio calls from your templates etc )

no…

i’m not " concerned " with visual interface.

i’m just pointing out the issues related to it.

and, again, as much as we ( me and you, as much as the next person ) would love import stuff from blenders and what not, it’s not ideal. as i’m not sure devs will allow that to begin with.

so, i’m more focused on improving things that we have for easier access and better use.

am i making my self clear?

do we have other solutions?

don’t think so.

i mean, beside the templates not being actually free to be customized, and not working in multiplayers, those are just minor things, granted, i might not be the most qualified person to talk about templates, but those do work as intended ( outside multiplayer ) which it’s what they are working on as far as i’m aware.

on that, i think i got it.

( more or less )

what’s the difference?

well,. that’s what i wanted to use them for.

but no, prefabs also work on soldiers, effect, and others templates if included in the selection ( not all, but a portion )

why not.

we have done that before, what’s the difference now.

well, no.

i made through pure anger and lots of time loss for something that should be relatively easy to do.

i wish i would have been able to do those through prefab?

so i couuld have added more details and better position.

which perhaps would make more sense on a car.

giving the outer appear onto an already existing car.

granted, might not be refined, but for the time being it’s possibly the best solution.

and so far, i still don’t know how decorators attach works on normal vehicles like you did.

because mine only worked on tanks.

but that’s a my thing.

i don’t see why all of a sudden, it’s a problem if i try to use prefabs onto vehicles for easier and faster use.

h o w.

i’m not really sure how those would work, or what would they do.

but i still don’t understand how prefabs can’t be used in entities.

like, why and what.

:wink:

you’re not even understanding what i’m typing to you.

taking things out of context won’t make you look smarter.
or prove a point to begin with.

I worenwe explained it very clearly above.

Why have you always avoided the concept of template?

Who has the means to tell you in a moment what I know?

I said adding entities to the scene would waste computing resources, but you said no, what can be done about this?

Yes means yes, no means no.

Programming things are always objective.

I just don’t want to waste my time arguing about your point of view. Because to some extent it will turn into a meaningless quarrel.