s2ext

Bitte logg dich ein oder registriere dich.

Einloggen mit Benutzername, Passwort und Sitzungslänge
Erweiterte Suche  

Neuigkeiten:

Fehler und Spammer oder Probleme beim Login hier melden.

Autor Thema: Add Building  (Gelesen 1725 mal)

xweetok59

  • Newbie
  • *
  • Beiträge: 31
Add Building
« am: Dezember 31, 2010, 14:28:00 Nachmittag »

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?
« Letzte Änderung: Januar 01, 1970, 01:00:00 Vormittag von Guest »
Gespeichert

Quester

  • Newbie
  • *
  • Beiträge: 505
Re: Add Building
« Antwort #1 am: Dezember 31, 2010, 15:52:49 Nachmittag »

First, you have to create the entry for this object. Go to objects_ext_buildings.inf and write the following at the bottom of the file:
Code: (text) [Auswählen]
  1. #You have to choose an unused ID, like 1032 in this case
  2. id=1032
  3. #The name of you building
  4. name=House
  5. group=building,ext,xweetok
  6. #The icon path, if you have no Icon, just delete this line
  7. icon=gfxexticonspavillon_damaged.bmp
  8. #The model path
  9. model=gfxextpavillon_damaged.b3d
  10. #The health of the Object
  11. health=2000
  12. #The material
  13. mat=stone
  14. #If the object is too big or too small, you can adjust this with this value
  15. scale=1
The line that start with "#" can be left out.

Then you have to add an entry to the buildings.inf:
Code: (text) [Auswählen]
  1. #Once again, the ID of your building
  2. id=165
  3. #The group you want the building to appear in
  4. group=building
  5. #The object that you want to build, in our case it's 1032
  6. objectid=1032
  7. req=97,4
  8. req=32,5

req sets the required items for this building. The first value is the item ID and the second the amount that is needed. You can add as many "req" entries as you want.
When you want to build your building you have to unlock it first. This can be done with the [s2s:cumy4oaz]unlockbuilding[/s2s:cumy4oaz] command. In our case it should say
Code: (text) [Auswählen]
  1. unlockbuilding 165;
You can write it in the Global Map Script for testing purposes:
Code: (text) [Auswählen]
  1. on:start {
  2. unlockbuilding 165;
  3. }
Or you write it in the game.inf under "unlockbuilding 62;". When you want your house to be unlocked when a certain building was build, you can write it the the entry in the buildings.inf, as you can see with other entries there.
« Letzte Änderung: Januar 01, 1970, 01:00:00 Vormittag von Guest »
Gespeichert