Hello, I hope you are well.
I spent time playing with this script, but I can't seem to get it to work. So the message that appears tells me that the buffer is not correct, but I don't know what to do.
Here is how the model is loaded with Hex2obj:
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Hot Wheels World Race NGC Script Help
- shakotay2
- MEGAVETERAN
- Posts: 4284
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1146 times
- Been thanked: 2242 times
Re: Hot Wheels World Race NGC Script Help
Hello,
do a correction of one line only, DWORD FIs here, means 4 instead of 2 bytes:
FBuff = bs.readBytes(FCont*3*4)
btw: "FCont"? In english you'd better choose "FCount" or "FCnt" or "FaceCnt", just as a thought.
do a correction of one line only, DWORD FIs here, means 4 instead of 2 bytes:
FBuff = bs.readBytes(FCont*3*4)
btw: "FCont"? In english you'd better choose "FCount" or "FCnt" or "FaceCnt", just as a thought.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
- reh
- veteran
- Posts: 102
- Joined: Mon Nov 16, 2015 11:18 pm
- Has thanked: 58 times
- Been thanked: 92 times
Re: Hot Wheels World Race NGC Script Help
Thank you very much , now the script loads the templates, I still need to edit it to load the second mesh, the way I did until it loads the second mesh, but stops loading files that have only one mesh.
Thanks for the tip, I will make changes to the script and then post it here.
-
- ultra-veteran
- Posts: 467
- Joined: Thu Dec 07, 2006 11:25 pm
- Has thanked: 9 times
- Been thanked: 95 times
Re: Hot Wheels World Race NGC Script Help
Can you tell me how did you extract the .bah/bad archive files?
Here I attached the converted file in Wavefront .obj format.
You do not have the required permissions to view the files attached to this post.
- reh
- veteran
- Posts: 102
- Joined: Mon Nov 16, 2015 11:18 pm
- Has thanked: 58 times
- Been thanked: 92 times
Re: Hot Wheels World Race NGC Script Help
I extracted the files with the script found here.
Here is the script for the templates, so far with the files I tested it worked fine.
You do not have the required permissions to view the files attached to this post.
- reh
- veteran
- Posts: 102
- Joined: Mon Nov 16, 2015 11:18 pm
- Has thanked: 58 times
- Been thanked: 92 times
Re: Hot Wheels World Race NGC Script Help
Now, my question is how to get the textures? In the link where I found the scripts to extract, they say they are dds files, but the best thing I can do when trying to extract with Texturefinder was the following:
You do not have the required permissions to view the files attached to this post.
-
- ultra-veteran
- Posts: 467
- Joined: Thu Dec 07, 2006 11:25 pm
- Has thanked: 9 times
- Been thanked: 95 times
Re: Hot Wheels World Race NGC Script Help
I have finished my Hot Wheels: World Race .rom loader module and I have released the following program as web updates:
- 3D Object Converter v7.034 (Windows)
How to get the 3D Object Converter:
Download the 3D Object Converter from http://3doc.i3dconverter.com and install it or download and use the portable version.
After it just use the Help/Check for updates... function to get the v7.034.
- 3D Object Converter v7.034 (Windows)
How to get the 3D Object Converter:
Download the 3D Object Converter from http://3doc.i3dconverter.com and install it or download and use the portable version.
After it just use the Help/Check for updates... function to get the v7.034.
- reh
- veteran
- Posts: 102
- Joined: Mon Nov 16, 2015 11:18 pm
- Has thanked: 58 times
- Been thanked: 92 times
Re: Hot Wheels World Race NGC Script Help
I was trying to add the material name, with this code:
My intention was to ignore the "....ÿÿÿÿ" that appeared after the name, but I am getting this error:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 8: ordinal not in range(128)
How should I ignore these characters?
Code: Select all
MaterialNames = (bs.readBytes(16).decode("ASCII").rstrip("....ÿÿÿÿ"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 8: ordinal not in range(128)
How should I ignore these characters?
- shakotay2
- MEGAVETERAN
- Posts: 4284
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1146 times
- Been thanked: 2242 times
Re: Hot Wheels World Race NGC Script Help
Without showing the hex bytes you're reading no one can tell.
I assume the problem might be the "..." - rstrip() doesn't use them as wildcards, does it?
I assume the problem might be the "..." - rstrip() doesn't use them as wildcards, does it?
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
- reh
- veteran
- Posts: 102
- Joined: Mon Nov 16, 2015 11:18 pm
- Has thanked: 58 times
- Been thanked: 92 times
Re: Hot Wheels World Race NGC Script Help
Would these be:
You do not have the required permissions to view the files attached to this post.
- shakotay2
- MEGAVETERAN
- Posts: 4284
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1146 times
- Been thanked: 2242 times
Re: Hot Wheels World Race NGC Script Help
well, you simply need a function which reads zero-terminated strings, don't you?
Seems you need to create it for yourself - found a base in fmt_Torchlight_mesh.py,
modified:
use it like so before your for i in range(1): loop
(btw: for some unknown reason while b != 0: doesn't work, why?)
Seems you need to create it for yourself - found a base in fmt_Torchlight_mesh.py,
modified:
Code: Select all
def ReadStringZeroT(bs):
name = b''
b = bs.readBytes(1)
while b != b'\x00':
name+=b
b = bs.readBytes(1)
return noeStrFromBytes(name)
Code: Select all
bs.seek(0x48)
print(ReadStringZeroT(bs))
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
-
- VIP member
- Posts: 1330
- Joined: Wed Nov 05, 2008 12:16 pm
- Has thanked: 2710 times
- Been thanked: 884 times
Re: Hot Wheels World Race NGC Script Help
Code: Select all
MaterialNames = bs.readString()
- reh
- veteran
- Posts: 102
- Joined: Mon Nov 16, 2015 11:18 pm
- Has thanked: 58 times
- Been thanked: 92 times
Re: Hot Wheels World Race NGC Script Help
Thank you very much, I will test these tips
Edit: The first code that Shakotay posted until it works, but if the model has more than one material, how would I do it?
I tried to put it in a loop, but it didn't work.
How would I use this code?
Edit: The first code that Shakotay posted until it works, but if the model has more than one material, how would I do it?
I tried to put it in a loop, but it didn't work.
How would I use this code?