Author Topic: Questions about: Adding a house, modifying textures and bookcase  (Read 1299 times)

Ralleyon

  • Hydlaa Citizen
  • *
  • Posts: 304
  • Protector in the Survivors of Vaern
    • View Profile
Questions about: Adding a house, modifying textures and bookcase
« on: September 14, 2006, 12:08:41 pm »
Now for the questions in detail:

1. I would like to add a house to the NPCroom for testing. I looked inside the DB, but this is not a thing which can be solved with it. The textures are loaded from the zip files in the world directory so my best guess is that I'd have to modify something there.... but how? A few pointers in that direction would be grand.

2. Related to 1. very much, I guess that by answering that you may be solving this one as well. The question is, how to modify the textures of a thing, like a window for example. No, I don't really mean modifying the actual texture with an editor of some sort (like GIMP or Blender), but actually putting it into the "world" after it has been created. Is there a PS tool for that, or Blender all the way?

3. This one is not so much related to the other two questions, but here goes. I'd like to add to Jayose's collection of books, but in order to do that I have to make the bookcases to act as containers. Sounds simple right? It would be if I had a bookcase texture. I'd simply add that to the common_strings table and then link it to an object in the item_stats table. But alas, that is not so easy, because there is no bookcase texture. The ones in Jayose's library are part of the world files, jayose.zip to be exact. How to link that to an actual item is a bit unclear to me right now.

And this is it for today folks. So, any ideas please?
To see the world in a grain of sand
And Heaven in a wild flower,
Hold Infinity in the palm of your hand
And Eternity in an hour.
     
   [William Blake - Auguries of Innocence]

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
Re: Questions about: Adding a house, modifying textures and bookcase
« Reply #1 on: September 14, 2006, 03:19:07 pm »
Re1:
  • Extract file "world" from npcroom.zip
  • convert it to xml format using docconv utility (one of CS tools), like this:

docconv -outds=tinyxml world
  • check bug report #1970, You may need to correct texture definitions after conversion
  • make a model of house and texture for it :P. I recomend Blender + blender2crystal + Gimp. (You can "extract" a house from other map as well, you would have to find proper meshfact in world from other zip file).
  • export your house as library, name the resulting file, for example, house.lib.
  • add the library to the world file by adding a line before first occurence of <sector name="xxxxx">

<library>house.lib</library>
  • add mesh object somewhere between <sector name="NPCroom"> and </sector> tags. You will need mesh factory name, which You can get from house.lib. Specify location/rotation of your house between <move> and </move> tags. Just look at other definitions of mesh objects (<meshobj>). You can find proper location in game using /pos or in walktest pressing ctrl-c.
  • Put your modified world file back to npcroom.zip, together with house.lib, your new textures and all other files created by exporter. You don't need to convert world back to binary format.
  • use walktest or PS client to to relight and test modified map.
Re2:
I'm sure You will figure it out yourself by looking into world file :). You just add a image to zip and define custom textue and material in "world" (or modify existng texture/material definition).

Re3:
I haven't experimented with this, I guess it needs only server side (database) changes. I guess you must associate meshobj name (not texture name) with certain actions by modyfying proper tables.
« Last Edit: September 14, 2006, 03:20:59 pm by Wired_Crawler »
"Close the world, txEn eht nepO."