Using scripts to determine texture...?

  • Hi folks!

    I'd need some help with the texture scriptings.


    I'll try to sum up my problem: I want to make a billboard model with plenty of different textures for it, but since I'll have about 60-70 versions, I don't really want to model and convert each version just to select one in script and then use visiblity flags to show only one.


    As far as I understand in the scripting system article, there's an easier way to do this, by having some texture list where the script determines the index of the texture that will be shown. What I don't see yet is how to use this. What is the internal texture list? I have to import each texture as a standalone texture (with the content tool standalone texture tool) or I can make some kind of list in the script file with texture names, or I have to use some kind of subfix in the names of the textures (like texture_0, texture_1...so on)?


    A bit of help would be very useful since this thing doesn't really have any example but I am sure that it is used in some cases (like billboards in DLC maps e.g.).

  • Explaining things is not really my speciality but I’ll try anyway:


    This internal list is (as far as I know) only for internal processing. You can‘t access it. All you can do is determine the index of a texture using the given function in the lexicon article which you read. This doesn‘t get you any further tho (as this index is only used by LOTUS itself). In order to change the textures of your object, you have to import textures as a standalone (as you said) and then use the function from the lexicon article to get its internal index. This index you have to link in the material settings to normal texture (the first option on the material page, not to confuse with the actual normal texture as in a bump map).


    But maybe I‘m wrong about that, thats just my understanding of how this system works. It‘s very possible that I‘m wrong


    EDIT: Thanks to Kartoffelphantom for pointing that out, sorry if it caused a misunderstanding. ^^°

  • That is pretty much my understanding as well. And it cannot be that wrong, because I use this in some of my objects and had no complaints about it so far. :-)


    For better illustration, this is the script for my billboards:


    ANZ_TEXTUREN represents the total number of advertisement-textures, the first number in the GetTextureIndex-function is my UserID, the second one the SubID of the first advertisement-texture. For this script it is important that all of these textures are importet with consecutive SubIDs.


    BELLA CIAO was also right about how to link the now obtained TexID to the material settings, but just to make it clear: In German it is called "Normale Textur" which is not to be confused with a normal texture as in bump map. It should go in the first texture slot. ;-)


  • Hi!


    Everything is explaned correct so far... ;-)


    I have one addition: You can also allow the map developer to set his own textures by let him enter userID and subID directly as start parameters. On the other hand, such a repaint feature, but included in LOTUS like vehicle repaints, is planned already.

  • Neu erstellte Beiträge unterliegen der Moderation und werden erst sichtbar, wenn sie durch einen Moderator geprüft und freigeschaltet wurden.

    Die letzte Antwort auf dieses Thema liegt mehr als 60 Tage zurück. Das Thema ist womöglich bereits veraltet. Bitte erstellen Sie ggf. ein neues Thema.

    Maximale Anzahl an Dateianhängen: 5
    Maximale Dateigröße: 500 kB
    Erlaubte Dateiendungen: bmp, cfg, ini, jpeg, jpg, lct, ldl, llg, lob, log, lpmtl, lptmt, ltx, pas, pdf, png, railtrack, rar, txt, veh, wav