Forum
Stranded II General Add buildingAdd building
4 replies 1
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)
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)
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
1
2
3
4
5
2
3
4
5
### Tent id=1 group=building objectid=184 req=97
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.
1