Download

[FREE] Example(s) - Build System

Hey guys,
i have been working on a survival game the past months.
Im really happy about my work so far and now it would be time to invest into it…
So i thought about putting some stuff on the marketplace but then it feels like its not worth the money and i would feel bad about it.

https://onedrive.live.com/redir?resid=B4CC68F0B7BD43E9!458&authkey=!AHJJTtNm9VYczh0&ithint=file%2crar

So im going to put an example project online, free to use (or more free to learn) which contains:

  • Build system
  • Interacting system including a way for request the interacting
  • Some building examples including 3d Widget for Hitpoint bars
  • Basic inventory system (needed for the subjects)
  • Basic craft system
  • Hotbar to quick use the items

(Its more about the Building system itself but we need to have a basic setup first)

What do i want to achieve?

  • I have not seen a lot of tutorials about this kind of stuff and i want to show one way of doing these things
  • Create a “table” where we can talk about ideas for “new buildings” and features (if people are interested in it)
  • Help others to create something fantastic
  • Learn something new myself (in case someone has better ways/ideas)

This is a large topic, im not too sure if i would recommend it to “new” Unreal or coding people.
I tried my best to comment stuff out and wrote a small textdocument that might help.
Its my first time to “publish” something with explanation, hopefully its not too bad (for now).
If you have any questions feel free to ask, or point something out that i should improve/change to make it more clear.

It is (yet) not multiplayer compatible, it should be fairly easy to implement since i made the events/variables for it but i dont know if im going to do that.
Less time and not being an “expert” on this subject.

Last Updated: 26.04.2016

Buildings created:

  • Floor
  • Wall
  • Doorway
  • Door
  • Chest
  • Campfire
  • Producing
  • Explosiv

Buildings im planing on doing:
***- Power Generator who consumes items to produce “power”

  • Consuming “power” buildings (for example a coldstore which stops the dacay of food? Or a wall thats under electricity and causes damage)***
  • Solar Panel that gives power at day and stops at night
  • Plants that grow and can be harvested (maybe not because my 3D Objects look like i butchered them)

If someone is interested in this im going to update this project.

I hope i did not forget something…

Anyway any thoughts?

Well done ! really impressive :slight_smile:

its nice I hope you can update it

Has it networking features too?
That would be cool if everything works with multiplayer too :slight_smile:
Cheers!

Sadly no.
But it should be easy to accomplish.
Most of it is build up to work with multiplayer but i just dont have the time to test it on a mulitplayer base to make sure that it works 100%.

Well it’s not so easy to make it multiplayer… Tell me if you’re making this multiplayer compatible :slight_smile:
Otherways good work m8 keep it up !

Cheers

Thanks for sharing.

This is pretty cool! I will check back later.

Im about to update it.
Its now a bit larger because i added some starter content to it. (For some fire / explosion and some textures/materials).

New Stuff:

Producing building that checks every x seconds if the inventory has space and creates every y seconds an item.
In case it has no space the timer gets reset / cleared for some accuracy. (You can change this very easily but i like it this way)

My first try for Generator / Consuming buildings.
No Ui for it yet because i really dont like the way it is right now.
I like that it calculates the time it produces depending on the power that gets consumed but it costs too much and is a nightmare for multiplayer.
Either i find a better solution or i just make it constant no matter how much power gets consumed.

Something explosiv that calculates the range in % for dmg events or something else.

A fitting mesh for the campfire / chest.

Also thought about stock breeding?
Would be for cannibals right now… but would be interesting to make.

first thank for sharing that is amazing.

Second can you explain the building system, i would like know how i can put for exemple a roof.

Keep the good work :slight_smile:

thanks:):slight_smile:

awesome stuff keep it up

Have you read the textfile? Maybe it helps, otherwise i need to work on that aswell. (pretty sure i need to)

Anyway

Create child BP from the MasterBuilding and name it Building_Roof.
Open Building_Roof and set the mesh to our foundation mesh.

Now we create the representative item:
Create child BP from MasterItem and name it Reciept_Roof.
Open Reciept_Roof anf set the mesh to what ever you want.

Open TableItems and add a new row:
Name the row just like the item : Reciept_Roof (It has to be the same name!)
Fill out the rest but:

Class: Has to be the same class as your new created item.
ItemTyp: Needs to be Building

BuildingPath
Typ: Structure (structure is for every predefined position building)
Mesh: The mesh of our building (foundation mesh)
Class: The class of our building (Building_Roof)
NeededStructure: Roof

Now we go to Building_Foundation and open it.

  • Add a new StaticMeshComponent
  • Set the mesh to Foundation
  • Name it Roof
  • Disable visibility and shadows
  • Change collision to Custom , Query Only , InvisibleBuildings and Ignore on everything.
  • Set the position where ever you want it to be

Now change the functions:

GetComponentTransform:
Add a new branch and test it like the other ones and return Roof and the world transform of the roof mesh.

EnableCollision and DisableCollision:
Also add new branches and test + change the collision like the ones in there.

annnnnd you have your roof now!

I did not implement it yet because now you can just place a foundation and a roof without any walls and thats something i wanted to avoid.

thank so much,

i’m read the txt, you said that the pivot need be in center of mesh right ? but in my meshs the pivot aren’t in center so for me change the pivot just in 3d program or i can change in unreal ?

and sorry for my bad english

Its only important if you want to rotate the building probably or want to place above the ground/terrain (for now).
Not for stuff that has a predefined transform.
I have red that you can change it in unreal -> https://forums.unrealengine.com/showthread.php?1140-Manually-changing-the-pivot-of-an-actor
but i do with a 3d programm.

8897552561dac9d47ea73b89363fcd5ee6747c70.jpeg

I had this problem when I try to create a new foundation

i hope you can see in pictures.

Looks like the pivot point is on top of the mesh and not below.
Its all about the pivot point when you place something on the ground.

That’s really awesome Urm92! A big sincere thanks for sharing that…I have so much to learn :frowning:

You are very generous to share that, Urm92 . People are selling only builidng for 20-30$ at marketplace. :slight_smile:

i change the pivot in blender, but i think i have some problem with colision

ddee2c894c4732287944304d1d57dcb436999615.jpeg

it’s ok but i cant build, if i change the mesh in table_item for foundation is ok, but when i use the mesh that i created this happens

i found the problem is pivot yet now fixed and thank.

you intend to post any update?

i intend make a hunger system if you like i can send to you.

Thanks