Using letoscript and CTP
Posted: Tue Apr 05, 2005 11:58 am
For those "category 3" users (Builders wanting to use the CTP on a pre-existing project with tileset related hak packs) I wondered if there would be much interest if anyone wanted to use letoscript to try to move their modules from using the existing tileset haks to using the same tileset if its included in the CTP.
For those that dont know, the Leto suite of tools is produced by Dragonsong that started with the Leto character editor and has since evolved into many different products, including a low-level gff manipulation language. http://weathersong.infopop.cc/6/ubb.x For this sort of application, the Moneo utility would be most useful. This could take some letoscript code and replace all references in a module to the old tileset with the new tileset. Its nothing that a builder couldn't do by hand, but it would be automated, and therefore a lot faster and reliable.
For example, if you had a 50 area module, and 10 of those areas used tileset Alpha (a hypothetical tileset). Alpha was added as a stand-alone hak, but is also in the CTP. If the .set file is not renamed between the stand-alone and CTP, then you should be able to simply swap the haks, which doesn't require any other changes and is straightforward.
However, I assume that most tilesets have been renamed in some way? If so then by hand, the builder would have to open every .are file in the .mod and change the TileSet field from the old .set to the new .set Also, if any tiles were renumbered (for example, two variations merged), then the builder would have to go through the Tile_List list in each .are file and check each tiles number, changing those that have been renumbered as appropriate.
If letoscript + moneo was used, then this process could be automated and would be a lot faster. Also, if you wanted to randomly replace some tiles with new options in the CTP (for example, if before there was only 2 tree tiles and with CTP there was 5) that could be written into the letoscript as well.
There are a few drawbacks to this however. Firstly it requires learning how to use yet another tool and secondly learning how to use letoscript. On the plus side, once youve got letoscript, you can use it on a live server via NWNX and the NWNX-Letoscript plugin to modify almost any gff data dynamically (e.g. renaming NPCs). Or you could use it to reduce some tedium when building, for example if you wanted to change the OnEnter script for all the areas in a module. Thirdly, it requires you to learn what gff data is and what the various filetypes mean (nwn.bioware.com/developers is a good resource. Maybe this should be added to the "What every good builder should know" thread?)
Obviously this topic isn't much good before the CTP is released, but I thought I would mention it for anyone who would be put off from the CTP becuase of having to do a lot of work to move their module over to use CTP tilesets as opposed to their hand-picked haks. If anyone wants more information or questions, feel free to ask and Ill answer as best as I can.
For those that dont know, the Leto suite of tools is produced by Dragonsong that started with the Leto character editor and has since evolved into many different products, including a low-level gff manipulation language. http://weathersong.infopop.cc/6/ubb.x For this sort of application, the Moneo utility would be most useful. This could take some letoscript code and replace all references in a module to the old tileset with the new tileset. Its nothing that a builder couldn't do by hand, but it would be automated, and therefore a lot faster and reliable.
For example, if you had a 50 area module, and 10 of those areas used tileset Alpha (a hypothetical tileset). Alpha was added as a stand-alone hak, but is also in the CTP. If the .set file is not renamed between the stand-alone and CTP, then you should be able to simply swap the haks, which doesn't require any other changes and is straightforward.
However, I assume that most tilesets have been renamed in some way? If so then by hand, the builder would have to open every .are file in the .mod and change the TileSet field from the old .set to the new .set Also, if any tiles were renumbered (for example, two variations merged), then the builder would have to go through the Tile_List list in each .are file and check each tiles number, changing those that have been renumbered as appropriate.
If letoscript + moneo was used, then this process could be automated and would be a lot faster. Also, if you wanted to randomly replace some tiles with new options in the CTP (for example, if before there was only 2 tree tiles and with CTP there was 5) that could be written into the letoscript as well.
There are a few drawbacks to this however. Firstly it requires learning how to use yet another tool and secondly learning how to use letoscript. On the plus side, once youve got letoscript, you can use it on a live server via NWNX and the NWNX-Letoscript plugin to modify almost any gff data dynamically (e.g. renaming NPCs). Or you could use it to reduce some tedium when building, for example if you wanted to change the OnEnter script for all the areas in a module. Thirdly, it requires you to learn what gff data is and what the various filetypes mean (nwn.bioware.com/developers is a good resource. Maybe this should be added to the "What every good builder should know" thread?)
Obviously this topic isn't much good before the CTP is released, but I thought I would mention it for anyone who would be put off from the CTP becuase of having to do a lot of work to move their module over to use CTP tilesets as opposed to their hand-picked haks. If anyone wants more information or questions, feel free to ask and Ill answer as best as I can.