Forum

> > Stranded II > General > Add building
Forums overviewStranded II overviewGeneral overviewLog in to reply

English Add building

4 replies
To the start Previous 1 Next To the start

old Add building

xweetok59
User Off Offline

Quote
I just made a building, a house. Now, what do i have to do? In what file(s) do i have to define it? What do i have to put in it? In the object ID, in the ID? I don't understand a fuck. Could someone maybe explain it? I tried some things but it said it was already defined or something. Oh, and i also want it to be buildable. So... Anybody?

old Re: Add building

Hurri04
Super User Off Offline

Quote
have a look at the objects_buildings.inf in the sys folder.
copy one of the definitions of a building with no special scripts to the vary bottom of the file and change these things:
• ID
• name
• model
• icon
to get an ID which is not already used by any other object you have to look into the objects.inf file. choose the highest ID you can find +1.
the model and the texture go into the gfx folder so you have to define them like
model=gfx\house.b3d
and the same with the icon, just have a look at the other definitions.


to be able to build this you have to edit the buildings.inf file.
scroll to the very bottom, copy on of the already existing definitions and change the stuff you need:
• ID of the building (this is different from the object ID)
• object ID
• building materials (type, number)

old Re: Add building

xweetok59
User Off Offline

Quote
Hurri04 has written
have a look at the objects_buildings.inf in the sys folder.
copy one of the definitions of a building with no special scripts to the vary bottom of the file and change these things:
• ID
• name
• model
• icon
to get an ID which is not already used by any other object you have to look into the objects.inf file. choose the highest ID you can find +1.
the model and the texture go into the gfx folder so you have to define them like
model=gfx\house.b3d
and the same with the icon, just have a look at the other definitions.


to be able to build this you have to edit the buildings.inf file.
scroll to the very bottom, copy on of the already existing definitions and change the stuff you need:
• ID of the building (this is different from the object ID)
• object ID
• building materials (type, number)

Yeah but if i define it in buildings.inf, do i have to make another object id and normal id as in the objects_buildings inf or...? WAIT OMG NO, IT AGAIN CHANGD TO A PLANE. DAMN I WORKED 30 MINUTES - 1 HOUR ON IT. WHY DOES THIS HAPPEN?
edited 1×, last 31.12.10 05:01:08 pm

old Re: Add building

Hurri04
Super User Off Offline

Quote
I'll show you at this example:
1
2
3
4
5
### Tent
id=1
group=building
objectid=184
req=97
this is the definition which allows it to build the tent.

the first line is only a comment for modifiers so you directly know what it is when reading the definition.

the second line is the ID of the building. this ID is different from the objectID in line 4.
because of the line "id=1" the game knows that a new definition begins right there so all the lines beneath it belong to that building. you could even write the lines beneath it in a different order but you should always write it the same way in order to keep the code nice and tidy.

so basically you have a new "list" of buildings and which object is at which position depends on the ID you give the building in the second line.
the object-ID, however, is just the ID you gave the building as an object in the objects_buildings.inf file.

"req=97" just means what kind of item you need to build the building. also, you have to write the number of the needed items in here, like "req=97,2" ao you need 2 items of that kind.

the line "group=building" is for the different classes which appear when rightclicking with the hammer.


I think that's it and I hope I was able to help you.
To the start Previous 1 Next To the start
Log in to replyGeneral overviewStranded II overviewForums overview