The Forum is up for sale: XeNTaX Forum looking for new owner

Noesis script help

Post questions about game models here, or help out others!
Post Reply
User avatar
DGIorio
beginner
Posts: 25
Joined: Sun Jan 10, 2016 11:12 pm
Has thanked: 4 times
Been thanked: 18 times

Noesis script help

Post by DGIorio »

Hi everyone,

I would like to know how to read two files in Noesis, because I want to read the header and the model without needing to merge them.
My script is working well with merged files, but it will be better reading them separeted. It will help me in my texture script, because I also need to merge the header and raw texture.

Also, if I could do it, I could improve the script to read the main file I call every other file.

Thanks in advance.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1411 times

Re: Noesis script help

Post by chrrox »

example

Code: Select all

		baseName = rapi.getExtensionlessName(rapi.getLocalFileName(rapi.getLastCheckedName()))
		if( rapi.checkFileExists( rapi.getDirForFilePath( rapi.getLastCheckedName() ) + baseName + ".txd" ) ):
			texData = rapi.loadIntoByteArray( rapi.getDirForFilePath( rapi.getLastCheckedName() ) + baseName + ".txd" )
			txdLoadRGBA(texData, self.texList)
User avatar
DGIorio
beginner
Posts: 25
Joined: Sun Jan 10, 2016 11:12 pm
Has thanked: 4 times
Been thanked: 18 times

Re: Noesis script help

Post by DGIorio »

chrrox wrote:example

Code: Select all

		baseName = rapi.getExtensionlessName(rapi.getLocalFileName(rapi.getLastCheckedName()))
		if( rapi.checkFileExists( rapi.getDirForFilePath( rapi.getLastCheckedName() ) + baseName + ".txd" ) ):
			texData = rapi.loadIntoByteArray( rapi.getDirForFilePath( rapi.getLastCheckedName() ) + baseName + ".txd" )
			txdLoadRGBA(texData, self.texList)

Thanks chrrox, it worked very well :)
Post Reply