Nexus Buddy 2

Nexus Buddy 2 - Granny Editor for Civ 5 2.5.3

The nb2 from this unit, which works fine ingame as you can see here:
Spoiler :


The error in the Python console is the following:
Code:
Compiled with Python version 2.6.2.
Checking for installed Python... got it!
processing mesh name:Orc...
Number of vertices in mesh:2270
Number of normals in mesh:2270
Number of triangles in mesh:2120
Traceback (most recent call last):
  File "C:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\nb2_import.py", line 652, in fileCallback
    error = import_ms3d_ascii(filename)
  File "C:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\nb2_import.py", line 257, in import_ms3d_ascii
    mesh.faces.extend(faces)
KeyError: 'index out of range'
 

Attachments

  • orc_boy.7z
    84.6 KB · Views: 222
Alright. Read through a lot of stuff now and still found no answer, so I'll ask for help here. I'm trying to retexture a (Beyond Earth-)Forest, copied the file (forest_alfa.gr2), renamed it, opened it in Nexus Buddy 2 to see what's up with the textures, but all it gives me is this:

Spoiler :


I had retextured a few aliens before, so that was no big deal - but that looks a lot different than what I was hoping for. The only material is "Diffuse" which... well, already sounded wrong and turned out not to be what I was looking for, because changing the dds that is associated didn't do anything (the custom forest itself is replacing the old model properly, just the texture is the wrong one).

So... what am I missing? How do I retexture that damn thing?
 

Attachments

  • whatswrong.jpg
    whatswrong.jpg
    184.4 KB · Views: 488
So... what am I missing? How do I retexture that damn thing?

You need to create a DDS for texture that has a name that is different from any of the vanilla textures. Just creating a new texture that has the same name won't work. Also make sure that you have load into VFS set to true for the new texture in your mod config.
 
Yes, I have created a new texture, it's called forest_frozenwonderland.dds - and it has VFS = true. The texture itself is loaded and works (because if I rename it into an existing forest-texture, then it gets replaced properly) - it's just that the forest_frozenwonderland.gr2 does not want to use it, although I've changed the Material to use it as a source.

/edit: Oh, and a custom .fxsxml is also in place as described in Nutty's Guide, but still doesn't seem to work.
 
Yes, I have created a new texture, it's called forest_frozenwonderland.dds - and it has VFS = true. The texture itself is loaded and works (because if I rename it into an existing forest-texture, then it gets replaced properly) - it's just that the forest_frozenwonderland.gr2 does not want to use it, although I've changed the Material to use it as a source.

/edit: Oh, and a custom .fxsxml is also in place as described in Nutty's Guide, but still doesn't seem to work.
Is Reload Landmark System checked?

If that doesn't work, then unfortunately I've seen that some of the landmark stuff is hard-coded, and requires manual copying (i.e., copying to the Assets folder and either making a fake DLC or setting LooseFilesOverridePAK to 1 in config.ini
 
Yes, Reload Landmarks is checked.

Well, that's a bummer. Will see if it works as fake-dlc later. One thing I noticed though is that, if I enter an invalid texture, the whole mesh will show in white, so... the interaction seems to be there, but once there's a texture it gets automatically replaced with the original texture of the model - even if I use it in a Biome that it's normally not used in or the new PlanetSpec that I've created.

So... the game seems to "know" what model I've used as a basis for my own model and then replaces my texture with the original one. I don't get how or WHY it works that way.
 
Is Reload Landmark System checked?

If that doesn't work, then unfortunately I've seen that some of the landmark stuff is hard-coded, and requires manual copying (i.e., copying to the Assets folder and either making a fake DLC or setting LooseFilesOverridePAK to 1 in config.ini

not to get off NB topic. Has anyone tried a "graphics patch" and put new graphics in the base game files but then call those files through a mod? I know a mod won't load new terrain/wonder graphics. But if those graphics are put into a DLC folder will a mod be able to load them then?
 
Should be able to load them, yes.
 
Aw, that would be awesome. Beyond Earth unit effects might still have a chance in Civ5 then?

I think if export them then convert them they should. I looked at the paradrop effect - which uses a bunch of models - and they appear to be handled like units. I tried poking around for the fxsxml and how it is called but didn't finish doing that
 
The nb2 from this unit, which works fine ingame as you can see here:
Spoiler :


The error in the Python console is the following:
Code:
Compiled with Python version 2.6.2.
Checking for installed Python... got it!
processing mesh name:Orc...
Number of vertices in mesh:2270
Number of normals in mesh:2270
Number of triangles in mesh:2120
Traceback (most recent call last):
  File "C:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\nb2_import.py", line 652, in fileCallback
    error = import_ms3d_ascii(filename)
  File "C:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\nb2_import.py", line 257, in import_ms3d_ascii
    mesh.faces.extend(faces)
KeyError: 'index out of range'

The problem is that the some of the triangles in the mesh refer to vertex index numbers that do not exist.

If you edit the code at line 253 in io_import_nb2.py to be this:
Code:
	if v1 < numVerts and v2 < numVerts and v3 < numVerts:
		faces.append([v1,v2,v3,0])

... then the bogus triangle data will simply be ignored. With this change I was able to import the Orc model to Blender OK.
 
The problem is that the some of the triangles in the mesh refer to vertex index numbers that do not exist.

If you edit the code at line 253 in io_import_nb2.py to be this:
Code:
	if v1 < numVerts and v2 < numVerts and v3 < numVerts:
		faces.append([v1,v2,v3,0])

... then the bogus triangle data will simply be ignored. With this change I was able to import the Orc model to Blender OK.

Just tried that - this was the result. So, some improvement but still messed up.

Were you using Blender 2.7 by any chance?
 

Attachments

  • orcscrewed.png
    orcscrewed.png
    37.6 KB · Views: 220
Just tried that - this was the result. So, some improvement but still messed up.

Were you using Blender 2.7 by any chance?

Yeah, this fix was for 2.7 script. I can look into an equivalent fix for the 2.49 script.
 
Here is an updated NB2 import script for Blender 2.49 with fix for bogus triangles.
 

Attachments

  • nb2_import.zip
    6 KB · Views: 179
Hey Deliverator, I've been unable to get your software to open correctly.

I have a feeling this is due to the fact that I'm trying to use it to open gr2 files from a different game, and from what I can tell it's looking for Civilization .dll files and file structures, and I don't have those, since I don't own Civ. Preferably I want to use it as a standalone for opening gr2 files from anywhere.
I could not find anything that could open and export gr2 files to a format that Blender could import other than your software.

I'm not a developer (3D artist) and can't configure your software myself, but I'm fairly experienced with Windows/computers in general, and would be willing to attempt any sort of method or suggestion you have to open this software by itself.

Any insight or help you could provide would be awesome, and I'd be glad to help you out with any 3D/Blender related problems in return. :D


Currently I'm running Windows 7 64bit, and I have Net framework 4 installed.
 
Top Bottom