1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Nexus Buddy 2 - Granny Editor for Civ 5 2.5.3

3D Graphics Tool for Civilization 5 and Beyond Earth

  1. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,260
    Location:
    London, UK
    Nexus Buddy 2 is a tool for importing and altering 3D Graphics in Civ 5 and Beyond Earth. It allows new textures to assigned to existing models and for completely new 3D models to be imported from FBX and/or BR2 format files.




    Installation
    In order to run Nexus Buddy 2 you need to perform the following steps:
    1) Create a folder called "Dummy" somewhere on your hard drive. Within it create two folders one called "Assets" and one called "Resource".
    2) Now using Regedit create an entry under HKEY_CURRENT_USER\Software\Firaxis\Tools called "ToolAssetPath". Set the value to the location of your Dummy directory.
    3) Now you should be able to run the Nexus Buddy 2 executable from wherever you have unzipped it.




    Latest Version: Nexus Buddy 2 versions

    Latest Blender Scripts for Nexus Buddy 2: download here
    Both Blender 2.7+ and Blender 2.49 are supported.

    Latest Source Code - source code available on Github.


    Latest Changelog: 2.5.2 - 5th March 2019
    * Can now open and export all models including for example marine.gr2 which wouldn't open previously.

    * Can Export to CN6 format for import into Blender 2.7+. Make sure to use the latest Blender scripts to do this.


    Changelog: 2.3.3 - 23rd April 2016

    * Bugfix: The SREFMap is no longer overwritten with blacksref_sref.dds. The defaulting is now properly implemented without unwanted side effects!

    * Bugfix: The options in the Axis dropdown for inserting a rotation bone are now properly labelled.


    Changelog: 2.3.2 - 1st April 2016

    * Improved stability of animation export by catching memory access violations and attempting to retry. This seems to allow almost all .gr2 animations to be successfully exported to NA2 format. Start and end time are automatically determined so they don't need to be manually entered (although they can still be over-ridden).

    * Re-added Open BR2 under Additional Actions for full import of skeleton and mesh from BR2 format.

    * When importing models from FBX or BR2 the Right Vector, Up Vector, Back Vector under ArtToolInfo are now set to the same values as for vanilla models. This corrects for the fact that different axes represent Up in Blender and CiV .gr2 - in Blender Z is Up but in CiV .gr2 Y is Up. The upshot of this is that models that appear upright in Blender will now appear upright in CiV .gr2 when imported from FBX (or full non-overwrite BR2).

    Changelog: 2.3 - 25th March 2016

    * Export Animations! You can now export animation data from Civ V and Civ BE and import it into Blender via the NA2 format. For more on this see the tutorial here.

    * Insert Rescale Bone has been replaced by Insert Adjustment Bone which can alter the rotation of the model as well as the scale. This can be used to fix the orientation of your model after conversion to GR2. To insert a rotation bone just select an axis and a rotation angle in degrees. This should be stackable if you need to apply two or more rotations.

    * Reorder FTSXML Triggers now also resets all the trigger ids to ensure they are unique beginning from 1. For FTimedTriggerTransfer entries the assumption is that the FTimedTriggerEffect that is referenced by the refid is the previous row; if this is not the case you may have to manually fix up the ids and refids.

    * The SREFMap texture for UnitShader_Skinned now defaults to blacksref_sref.dds (an all black texture from the Civ V texture set).

    Changelog: Nexus Buddy 2.2.4 - 7th March 2016

    A set of new Additional Actions to support working with animation and effects. :)

    * Reorder FTSXML Triggers - this will load any .ftsxml file and reorder the triggers rows by event code and also add in comment rows with a string description of the event code. The resulting file will be saved in the same directory with an underscore appended to the filename i.e. bob.ftsxml -> bob_.ftsxml.

    Sample block:
    Spoiler :
    Code:
     <triggers>
        <!-- 1100 AttackA -->
        <trigger type="FTimedTriggerSound" id="100" time="0" duration="1" repeat="0" ec="1100" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_BATTLE_AMB_VOX_T1" bone="" tier="1" />
        <trigger type="FTimedTriggerSound" id="100" time="0" duration="1" repeat="0" ec="1100" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_BATTLE_AMB_VOX_T2" bone="" tier="2" />
        <trigger type="FTimedTriggerSound" id="27" time="0.298148245" duration="0" repeat="0" ec="1100" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_ATTACK_VOX_H" bone="" tier="-1" />
        <trigger type="FTimedTriggerSound" id="28" time="0.00370370364" duration="1" repeat="0" ec="1100" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_BAT_AMB_T2_$(WEAPON)" bone="" tier="2" />
        <trigger type="FTimedTriggerSound" id="29" time="0.266667068" duration="0" repeat="0" ec="1100" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_SWORD_SWING" bone="" tier="-1" />
        <trigger type="FTimedTriggerSound" id="31" time="0" duration="1" repeat="0" ec="1100" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_BATTLE_AMB_VOX_T2" bone="" tier="2" />
        <trigger type="FTimedTriggerSound" id="36" time="0" duration="1" repeat="0" ec="1100" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_BAT_AMB_T1_$(WEAPON)" bone="" tier="1" />
        <trigger type="FTimedTriggerSound" id="77" time="0.2558064" duration="0" repeat="0" ec="1100" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_ARMOUR_MOVE" bone="" tier="-1" />
        <trigger type="FTimedTriggerEffect" id="10" time="0.237037" duration="0.233333" repeat="0" ec="1100" track="2" event="ART_DEF_VEFFECT_UNIT_SWORD_TRAIL_01" bone="Sword" />
        <trigger type="FTimedTriggerAction" id="103" time="0.303704" duration="0" repeat="0" ec="1100" track="4" action="1" />
    
        <!-- 1120 Charge_Run -->
        <trigger type="FTimedTriggerSound" id="47" time="0" duration="0" repeat="0" ec="1120" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_RUN_CHRG_VOX_T2" bone="" tier="2" />
        <trigger type="FTimedTriggerSound" id="47" time="0" duration="0" repeat="0" ec="1120" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_RUN_CHRG_VOX_T1" bone="" tier="1" />
        <trigger type="FTimedTriggerSound" id="63" time="0.02963" duration="0" repeat="0" ec="1120" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_HORSE_RUN_$(TERRAIN)" bone="" tier="-1" />
        <trigger type="FTimedTriggerSound" id="73" time="0.096296" duration="0" repeat="0" ec="1120" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_ARMOUR_MOVE" bone="" tier="-1" />
        <trigger type="FTimedTriggerEffect" id="6" time="0" duration="0.533333" repeat="0" ec="1120" track="2" event="ART_DEF_VEFFECT_DUST_TRAIL_MD" bone="Horse" />
    
        <!-- 1140 Charge_Attack -->
        <trigger type="FTimedTriggerSound" id="26" time="0.511111" duration="0" repeat="0" ec="1140" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_HORSE_RUN_$(TERRAIN)" bone="" tier="-1" />
        <trigger type="FTimedTriggerSound" id="33" time="0" duration="1" repeat="0" ec="1140" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_BATTLE_AMB_VOX_T1" bone="" tier="1" />
        <trigger type="FTimedTriggerSound" id="34" time="0" duration="1" repeat="0" ec="1140" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_BATTLE_AMB_VOX_T2" bone="" tier="2" />
        <trigger type="FTimedTriggerSound" id="37" time="0" duration="1" repeat="0" ec="1140" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_BAT_AMB_T1_$(WEAPON)" bone="" tier="1" />
        <trigger type="FTimedTriggerSound" id="38" time="0" duration="1" repeat="0" ec="1140" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_BAT_AMB_T2_$(WEAPON)" bone="" tier="2" />
        <trigger type="FTimedTriggerSound" id="58" time="0.029629" duration="0" repeat="0" ec="1140" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_HORSE_RUN_$(TERRAIN)" bone="" tier="-1" />
        <trigger type="FTimedTriggerSound" id="81" time="0.315129" duration="0" repeat="0" ec="1140" track="1" event="AS3D_UNIT_U_POLISH_WINGED_HUSSAR_ATTACK_VOX_H" bone="" tier="-1" />
    ....

    This is to make it easier to see and edit the sounds and visual effects that are triggered with each animation.

    * Convert all FBX Files in Directory to GR2 Animations - this is useful when you have exported a collection of FBXs from Blender with animation data and you simply want to batch convert them to GR2 format.

    * Remove Animations and Save - useful if you have imported from FBX with Animation data but you want to make a clean Model and Mesh .gr2 file. This will remove all animation data leaving everything else intact.

    * Insert Rescale Bone and Save - this will add a new bone to the top of the Skeleton bone hierarchy called NB2_RESCALE_BONE that will rescale the entire model. The scale must be specified in the Rescale Factor text box. The purpose of this is to provide a way of rescaling models without affecting the scale of the effects. See here for more. Warning: this is not designed to be repeatable and will overwrite your current file so make a copy first.

    * Add Scaled FX Bone and Save - This is an experimental feature! This will add a new child bone to the bone specified in the Parent Bone dropdown list. This new bone will have the scale specified in the Rescale Factor text box. The new bone will have the name of the parent bone with the suffix "_FX". The idea with this was to see how effects alter when they are attached to a rescaled bone. So far I think that using the Art Defines <Scale> to get the right scale for effects then using the Insert Rescale Bone options is going to be more useful.



    Old Changelogs

    Changelog: Nexus Buddy 2.2.3 - 25th January 2016

    * Added support for editing Leader background scenes - Leader_Transparent_Matte shader type and new Scene_Template for use with BR2 overwrite.

    * Force Materials to have unique names which fixes a few issues with editing them.

    * Some other small fixes and tidy up.

    Spoiler :


    Changelog: Nexus Buddy 2.2.2 - 19th July 2015 - Bugfix Release

    * Replaced flakey code for converting from float to half-precision floating point. This was causing issues when importing with binormal/tangents for Leaders.

    Changelog: Nexus Buddy 2.2.1 - 6th July 2015 - Bugfix Release

    * Occasional crash when clicking Save should now be fixed
    * Fixed multiple file dialog issue when using "Resave All Files in Directory"

    Changelog: Nexus Buddy 2.2 - 8th June 2015

    Changes to support 3D Leader modding:
    * Added support for reading in vertex binormals and tangents from .BR2 (see latest Blender 2.7x scripts) - in order to create meshes than have binormal and tangent data you need to check the 'Leader Format for Overwrite from BR2" checkbox before performing the overwrite. The purpose of this is so that the normal texture layers appear correctly in game for Leaders - see here.

    * Texture file paths are now automatically pruned to just the filename.
    * Fixed issue where you couldn't assign a material when there were multiple materials with the exact same name e.g. Alexander.
    * Can no longer open a BR2 file directly. Added Ovwr. BR2 button to the header - this is the only reliable way to import mesh data.
    * Remove several old redundant features.

    If you are having problems getting Nexus Buddy 2 to run, then there are some things that have worked for others further down this thread, particularly at this post, this post and this post.

    Spoiler :



    Latest Changelog: Nexus Buddy 2.1 - 28th October 2014

    Changes to support working with Beyond Earth 3D Assets
    + Added facility to load .gsd string database files so that .gr2 3D models can be re-united with their string data. Once saved the results .gr2 files may be used in Civ 5 or Civ BE without the string database being required.
    + Added facility that will automatically load and resave all .gr2 files in directory in a subdirectory called /resaveBatch. This is helpful in batch resaving .gr2 files so that they can be used in either Civ 5 or Civ Beyond Earth.
    + Minor bug fixes and tweaks

    Tutorial on working with Beyond Earth models to follow, but for now read this post.

    The key point is that you need to load the relevant string database first using Load String Database under Advanced Actions before loading the Civ BE .gr2 file.



    Civ Beyond Earth unit exported via NB2 to Blender 2.49:



    Latest Changelog: Beta 9 - 11th February 2014

    + Save Animation now saves Art Tool and Exporter info into the .gr2 - the lack of this was causing animations to appear twisted.
    + A new function called Export Model and Animation will separate a .gr2 file containing both a model and animation into two separate files. These will be written to a new folder /export.



    Changelog: Beta 8 - 20th January 2014

    Changes to support the modding of Wonders, Buildings, Citystyles, Improvements, etc.

    + Added the ability to select a current Model within .gr2 files that contain multiple Models.
    + The Mesh/Material assignment window is now filtered to show only Meshes belonging to the current model.
    + Overwrite Meshes from BR2 will now overwritten meshes for the currently selected Model.
    + Can now export only the currently selected model to NB2 from which it can be imported into Blender.
    + Added more warnings to prevent crashes when attempting to use View when either no file is loaded or a vanilla .gr2 has not yet been saved.





    Changelog: Beta 7 - 17th September 2013

    + Reverted NB2 Export to use 6 decimal places for values rather than 8. This change was causing skeletons to be incorrect when imported to Blender.
    + Also added a check box allow NB2 export to use the old C++ code - no one should really need to use this - it's just for my own testing.

    Changelog: Beta 6 - 27th June 2013

    The instability of the FBX import has been made creating custom 3D art for Civ 5 frustrating so far. I now create a new file format, BR2, that can be exported from Blender and imported to GR2. So far direct import from BR2 is only tested for Units - otherwise it is experimental! However, the format can also be used to overwrite meshes in an existing GR2 allowing new custom Leader graphics to make use of existing animations.

    Other changes/improvements in this version:
    + View and Export to NB2 no longer automatically save you current GR2 - you will need to do this manually again.
    + NB2 export no longer relies on a separate C++ executable - it is all now written in C# code
    + Several functions have been removed as they have been superseded by BR2 import/overwriting.
    + Floating point decimal places in both NB2 export from Nexus Buddy and BR2 export from Blender is now 8 digits rather than 6.
    + Globalisation issues with export files being created with commas for decimal points should now be fixed.
    + Mesh and Bone names that are too long for Blender 2.49 are stored in the Armature Object by the NB2 Import and retrieved by the BR2 Export Script.



    A customized Wu made using the Overwrite Meshes feature:



    Changelog: Beta 5 - 9th June 2013

    + New NB2 export allowing most 3D GR2 assets, including leaders, to be extracted into Blender without a glitch.
    + Added FBX > GR2 x5 and FBX > GR2 x20 functions to the existing FBX > GR2 x10.
    + Warning: View (open in Granny Viewer) and Export to NB2 will now automatically save your current file first. This is to eliminate errors when first opening the original game GR2 files.







    Features

    Improvements over old versions of Nexus Buddy:
    + Import from BR2 provides a way of successfully getting models with multiple meshes into the game. There is no longer any need to combine meshes and textures which is good news for Civ 4 conversions. See mini tutorial below. *
    + Support for all known Leader shader types - allowing for Leader textures to replaced/switched. **
    + Support for SimpleShader - the shader used by Features and some other things.
    + View button will open Granny Viewer for the current file.
    + Save Animation will save only the animation from your current GR2 into a new gr2 file. Handy for when you are creating brand new animations or porting from Civ 4.
    + Export to NB2 will export your GR2 into NB2 format. NB2 files can be simply imported into Blender using the latest import script. See also tutorial.

    * FBX to Granny GR2 conversion generally mangles multi mesh objects.
    ** Leader textures can now be extracted using this tool.



    User Guide

    Open
    Open a GR2 file or import a BR2 or FBX file.

    Open FBX
    Open an FBX file.

    Save/Save As
    Saves the current GR2 file.

    Save Animation
    Saves only the animation from your current GR2 into a new GR2 file.

    View
    Opens the current GR2 file in Granny Viewer.

    Advanced Tab:

    Export to NB2
    Will export your GR2 into NB2 format. NB2 files can be simply imported into Blender using the latest import script. See also tutorial.

    If the GrannyFile contains multiple Models, for example, Wonders and some Leaders, then each model will be exported as a separate NB2 file with the suffix _model0.nb2, _model1.nb2, etc.

    Overwrite Meshes from BR2

    This is a very useful function which will overwrite the meshes in the currently open GR2 with the mesh data from a BR2 file that has been exported from Blender. This can be used when you want to customise the meshes an existing 3D Leader or create a new 3D Leader that uses the animations of an existing one. See this post.

    Load String Database
    This allows you to load the data from string database .gsd files. For Civ BE .gr2 files loading the relevant string database needs to be done first before loading the .gr2 so that the string names (Mesh Names, Material Names, Texture Paths, etc) are all populated. Using Save As to resave the file will create a .gr2 that includes all the missing string data.

    Resave All GR2 Files in Directory
    This will load and resave all the .gr2s files in a directory in a new subdirectory called resaveBatch.

    If you have first loaded a string database, the Resave All Files in Directory provides a batch facility for apply the string names to all .gr2 files in a directory. This will create a new copy of every .gr2 with the string names populated so I haven't used it for all the units at once - it will take a while and create a shedload of data. What I've done the model .gr2 and all animation .gr2 files to a directory and then used Resave All Files on that after loading the string database.

    This facility can also be used simply to allow all .gr2 models and animations in Granny Viewer as files need to be resaved before this is possible.

    Tutorials on 3D Graphics in Civ 5 and using Nexus Buddy 2

    Civ5 Modding 3D Graphics for Absolute Beginners
    Performing a simple unit reskin
    Extract GR2 to Blender with mesh and skeleton and re-export to GR2
    Getting Civ 4 Units into Civ 5 - Full Conversion
    Converting Civ 4 Units to Civ 5 - using Civ 5 animations - with Blender 2.7x
    Modding 3D graphics for Wonders, Buildings, Citystyles, etc
    Using Existing Unit Effects to Create Custom Units
    Civilization V: Leader Graphics Modding Guide
    Extract GR2 Animations into Blender and Re-Import to Civ V/Civ BE
    Animation Tweaks of Existing Civ 5 Units


    Known Issues/Tips

    1. Some vanilla GR2 files can only be opened if you use Load String Database to load the relevant .gsd file first e.g. expansion1models_stringdatabase.gsd.
    2. Sometimes BR2 export has zeros for all normals and will cause normals to be incorrect after import. This seems be resolved by switching on display normals in Blender.
    3. Some models don't export all meshes to NB2 because some meshes are not in the Model's Mesh Bindings. e.g. Indian Elephant.
    4. Some models' skeletons are not correctly imported to Blender via NB2 when using the Blender 2.49 scripts e.g. Spearman, Siamese Elephant. The solution is to use the newer Blender 2.7x scripts - you can save a .blend file using Legacy Mesh Format to get the model into Blender 2.49.
    5. You may need to split up your meshes when your model has more than 32 bones - see this post.
    6. You also need to ensure every separate mesh in your model is rigged to at least two bones. This is commonly an issue for weapons and human units. Duplicating and hiding a triangle is one solution or joining any unseen triangle from the body to the weapon mesh ensuring that it is rigged to a different bone from the weapon - a hand or foot etc. See here for more on this top tip!


    Future Plans and Ideas
    1. Extend Leader shader support to allow float and integer parameters to be viewed and edited.


    Credits

    @lemmy101 and @CaptainBinky for the original Nexus Buddy code.
    @S3rgeus for decompiling the Nexus Buddy source and fixing it up so it could be recompiled.
     

    Attached Files:

    Last edited: May 2, 2019
  2. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,260
    Location:
    London, UK
    The NB2 Format

    The NB2 Format was based on the Milkshape ASCII Txt format, but it has been altered to mirror the way data is held inside the GR2 Granny Format. The two changes are to allow for each mesh vertex to be weighted by up to four bones rather than one, and for bone orientations to be passed in quaternions rather than Euler coordinates.

    Here is the specification - with the differences from Milkshape ASCII highlighted:

    // Nexus Buddy NB2

    // total frames of animation
    Frames: 30

    // current frame of animation
    Frame: 1

    // number of meshes
    Meshes: 1

    // mesh: name, flags, material index
    "Mesh01" 0 0

    // number of vertices
    20

    // vertex: flags, x, y, z, u, v, boneindex 1, bone weight 1, boneindex 2, bone weight 2, boneindex 3, bone weight 3, boneindex 4, bone weight 4
    0 24.146100 17.435100 24.404400 0.775391 0.158569 207 0.878431 299 0.121569 207 0.000000 207 0.000000
    0 23.803100 17.423300 24.375100 0.787598 0.162476 207 0.658824 299 0.341177 207 0.000000 207 0.000000
    0 24.679900 17.270000 24.156700 0.753418 0.154297 207 0.980392 299 0.019608 207 0.000000 207 0.000000
    0 24.437600 17.373800 24.348800 0.764648 0.156128 207 0.921569 299 0.078431 207 0.000000 207 0.000000
    0 24.569100 16.936900 24.333400 0.753418 0.167358 207 0.960784 299 0.039216 207 0.000000 207 0.000000
    0 24.290700 16.875400 24.731000 0.762695 0.179321 207 0.921569 299 0.078431 207 0.000000 207 0.000000
    0 24.553600 16.753700 24.593800 0.753906 0.176758 207 0.960784 299 0.039216 207 0.000000 207 0.000000
    0 24.661100 16.716600 24.928000 0.753418 0.185059 207 0.960784 299 0.039216 207 0.000000 207 0.000000
    0 24.344900 17.041200 24.486600 0.763184 0.169556 207 0.921569 299 0.078431 207 0.000000 207 0.000000
    0 24.093300 17.119200 24.514300 0.772949 0.171387 207 0.839216 299 0.160784 207 0.000000 207 0.000000
    0 24.345200 16.846100 25.078300 0.759766 0.187622 207 0.858824 299 0.141177 207 0.000000 207 0.000000
    0 22.764500 17.027200 25.348300 0.197998 0.805664 207 0.486275 299 0.360784 324 0.152941 324 0.000000
    0 23.190500 16.981000 25.407100 0.190552 0.812012 207 0.521569 299 0.298039 324 0.180392 324 0.000000
    0 22.441900 17.220000 25.085900 0.204468 0.797363 207 0.517647 299 0.345098 324 0.137255 324 0.000000
    ....

    // number of normals
    6

    // normal: x, y, z
    0.000000 0.000000 1.000000
    1.000000 0.000000 0.000000
    0.000000 0.000000 -1.000000
    -1.000000 0.000000 0.000000
    0.000000 1.000000 0.000000
    0.000000 -1.000000 0.000000

    // number of triangles
    12

    // triangle: flags, vertex index1, vertex index2, vertex index3, normal index1, normal index 2, normal index 3, smoothing group
    0 0 1 2 0 0 0 1
    0 1 3 2 0 0 0 1
    0 4 5 6 1 1 1 2
    0 5 7 6 1 1 1 2
    0 8 9 10 2 2 2 1
    0 9 11 10 2 2 2 1
    0 12 13 14 3 3 3 2
    0 13 15 14 3 3 3 2
    0 12 16 6 4 4 4 3
    0 16 17 6 4 4 4 3
    0 18 13 19 5 5 5 3
    0 13 7 19 5 5 5 3

    ...

    // number of materials
    Materials: 1

    // material: name
    "Material01"

    // ambient
    0.200000 0.200000 0.200000 0.800000

    // diffuse
    0.000000 0.501961 0.752941 0.800000

    // specular
    0.752941 0.752941 0.752941 0.800000

    // emissive
    0.000000 0.000000 0.000000 0.800000

    // shininess
    63.000000

    // transparency
    0.800000

    // color map
    "D:\Eigene Dateien\Image2.tga"

    // alphamap
    "D:\Eigene Dateien\Image1.tga"

    ...

    // number of joints
    Bones: 3

    // name
    "bone1"

    // parent name
    ""

    // bone: flags, posx, posy, posz, quatx, quaty, quatz, quatw - bone orientation in quaternions
    0 0.000000 -0.000003 0.000000 0.707107 0.000000 0.000000 0.707107

    // number of position keys
    2

    // position key: time, posx, posy, posz
    1.000000 0.000000 0.000000 0.000000
    30.000000 0.000000 0.000000 0.000000

    // number of rotation keys
    2

    // rotation key: time, rotx, roty, rotz
    1.000000 0.000000 0.000000 0.000000
    30.000000 0.000000 0.000000 0.000000

    "bone2"
    "bone1"
    0 -1.599998 0.000000 0.000000 0.000000 0.000000 0.083053 0.996545
    3
    1.000000 0.000000 0.000000 0.000000
    15.000000 0.000000 0.000000 0.000000
    30.000000 0.000000 0.000000 0.000000
    3
    1.000000 0.000000 0.000000 0.000000
    15.000000 2.286381 -0.000548 -0.000365
    30.000000 0.000000 0.000000 0.000000
    "bone3"
    "bone2"
    0 -1.599998 -0.000002 0.000000 0.000000 0.000000 0.082807 0.996566
    2
    1.000000 0.000000 0.000000 0.000000
    30.000000 0.000000 0.000000 0.000000
    2
    1.000000 0.000000 0.000000 0.000000
    30.000000 0.000000 0.000000 0.000000
     
  3. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,260
    Location:
    London, UK
    The BR2 Format

    Example file:

    // Nexus Buddy BR2 - Exported from Blender for import to Nexus Buddy 2
    skeleton
    0 "World" -1 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 1.00000000 1.00000000 0.00000000 0.00000000 0.00000000 0.00000000 1.00000000 0.00000000 0.00000000 0.00000000 0.00000000 1.00000000 0.00000000 0.00000000 0.00000000 0.00000000 1.00000000
    1 "Bone_Shield" 0 36.85475159 75.23165894 -3.31842041 0.14877282 0.03173966 0.35972491 0.92057443 0.73918116 -0.65286303 0.16547202 -0.00000000 0.67175102 0.69692934 -0.25107783 0.00000000 0.04859715 0.29674801 0.95371854 -0.00000000 -77.61801910 -27.38531494 15.95541096 1.00000000
    2 "Bone_Spear" 0 -44.82392883 60.87587738 -109.61169434 -0.78539664 0.52647841 0.09923945 0.31003875 0.42594400 -0.88852513 0.17057289 -0.00000000 -0.76545268 -0.25339288 0.59150183 0.00000000 -0.48234215 -0.38251191 -0.78805494 -0.00000000 12.81974506 -66.32946014 -114.74248505 1.00000000
    3 "CHARACTER_REORIENT" 0 0.00000047 61.61849976 -4.81262970 0.70710582 0.70710558 -0.00121962 0.00123159 0.00000035 1.00000000 -0.00000015 -0.00000000 0.99999380 -0.00000035 -0.00349044 -0.00000000 -0.00349044 -0.00000015 -0.99999386 -0.00000000 -61.63491440 0.00002030 -4.59752464 1.00000000
    4 "Base HumanPelvis" 3 2.28773403 -0.00000017 -1.94129324 0.00000010 0.00000071 -0.01831404 0.99983227 -0.03662158 0.99932915 -0.00000038 0.00000000 0.99932301 0.03662136 -0.00348902 0.00000000 -0.00348666 -0.00012815 -0.99999386 -0.00000000 -63.87976837 -2.34095120 -2.65632248 1.00000000
    5 "Base HumanLThigh" 4 1.15140712 5.87745810 -3.13681340 0.07037959 0.05835651 0.99059916 0.10175718 0.24517488 -0.96474576 0.09568323 -0.00000000 -0.96148968 -0.22932290 0.15148813 0.00000000 -0.12420514 -0.12913941 -0.98381728 -0.00000000 61.37716293 20.63085365 -10.19999027 1.00000000
    6 "Base HumanRThigh" 4 1.14947391 -5.87783813 -3.13681078 -0.06893929 0.01718078 -0.98743629 0.14114451 -0.24610847 -0.96904361 -0.01962334 -0.00000000 -0.96076041 0.24123220 0.13691694 0.00000000 -0.12794471 0.05254969 -0.99038810 -0.00000000 60.88895798 -21.39189911 -8.74440575 1.00000000
    7 "Base HumanSpine1" 4 3.05395317 -0.00050206 0.23366170 -0.00049247 -0.03390386 0.01435757 0.99932182 -0.00781253 0.99996632 0.00249240 -0.00000000 0.99742937 0.00797020 -0.07121059 0.00000000 -0.07122807 0.00192965 -0.99745810 0.00000000 -67.01528168 -0.41535199 1.65312767 1.00000000
    8 "Base HumanLCalf" 5 31.16638374 -0.02887809 0.00300289 0.01581883 -0.00000251 -0.00000074 0.99987489 0.24517687 -0.96123582 0.12615259 -0.00000000 -0.96148860 -0.22441736 0.15867150 0.00000000 -0.12420987 -0.16019674 -0.97923917 -0.00000000 30.21069527 20.32667351 -10.85158348 1.00000000
    9 "Base HumanRCalf" 6 31.16638184 0.00746209 0.00023668 0.00018467 -0.00000405 0.00000045 1.00000000 -0.24610950 -0.96905059 -0.01926344 -0.00000000 -0.96075910 0.24128363 0.13683563 0.00000000 -0.12795269 0.05218402 -0.99040645 -0.00000000 29.72248650 -21.40261841 -8.73697948 1.00000000
    10 "Base HumanSpine2" 7 16.92647362 -0.00004806 -0.00008953 0.00000096 0.05200798 0.00001672 0.99864668 -0.00799566 0.99996656 0.00166722 -0.00000000 0.99943089 0.00793672 0.03278279 0.00000000 0.03276846 0.00192838 -0.99946105 0.00000000 -83.65940857 -0.41250312 -7.07519150 1.00000000
    11 "Base HumanLFoot" 8 26.64601517 -0.02489353 0.00330932 -0.18250501 0.35916576 0.00991625 0.91520143 0.20705143 -0.97484916 -0.08245758 -0.00000000 -0.79277563 -0.11779656 -0.59802246 0.00000000 0.57326847 0.18919188 -0.79722655 -0.00000000 7.52110624 22.00863075 1.94292700 1.00000000
    12 "Base HumanRFoot" 9 26.64602280 0.00654361 0.00014966 0.13328381 0.37512574 -0.02867498 0.91689360 -0.20898660 -0.97487265 0.07712200 -0.00000000 -0.77251977 0.11622218 -0.62426388 0.00000000 0.59961456 -0.19004114 -0.77739739 -0.00000000 7.26756716 -22.09141159 1.81832993 1.00000000
    13 "Base HumanRibcage" 10 14.94387245 -0.00037450 -0.00001431 0.00000018 0.01943958 -0.00000114 0.99981105 -0.00805669 0.99996656 0.00135474 -0.00000000 0.99740124 0.00793901 0.07160771 0.00000000 0.07159456 0.00192813 -0.99743193 0.00000000 -98.25373077 -0.41235641 -10.90271854 1.00000000
    14 "Base HumanLCollarbone" 13 -1.15980828 2.01219749 -3.43310356 0.00779581 -0.06364108 0.87419271 0.48132744 0.84494966 -0.52188230 -0.11704248 -0.00000000 -0.52309579 -0.85197514 0.02256550 0.00000000 -0.11149383 0.04215771 -0.99287033 0.00000000 49.49603653 83.86190796 -2.49522543 1.00000000
    15 "Base HumanNeck1" 13 0.05307898 -0.00000188 0.23366334 0.00000380 0.21934034 -0.00000711 0.97564840 -0.00787352 0.99996644 -0.00223437 -0.00000000 0.87078285 0.00795481 0.49160334 0.00000000 0.49160466 0.00192499 -0.87081629 -0.00000000 -84.08134460 -0.41392943 -52.13995743 1.00000000
    16 "Base HumanRCollarbone" 13 -1.15991056 -2.01214099 -3.43310380 0.02139312 -0.09102264 -0.77622038 0.62348950 -0.96989834 -0.21348388 0.11713973 -0.00000000 -0.22299623 0.97192454 -0.07506793 0.00000000 -0.09782518 -0.09892999 -0.99027425 -0.00000000 19.36214638 -95.18619537 7.08948660 1.00000000
    17 "Base HumanLUpperarm" 14 12.10039806 -0.31263322 2.88631296 0.01457031 0.00631253 0.05900262 0.99813151 0.77870715 -0.62088531 -0.09009228 -0.00000000 -0.62016392 -0.78349179 0.03920899 0.00000000 -0.09493086 0.02533965 -0.99516118 0.00000000 47.12080765 78.99443817 -7.22890043 1.00000000
    18 "Base HumanNeck2" 15 4.96404505 -0.00004679 0.00002472 -0.05023009 -0.09462403 -0.00127871 0.99424422 -0.00119019 0.99504507 0.09941798 -0.00000000 0.94780463 -0.03057694 0.31738225 -0.00000000 0.31884950 0.09460655 -0.94307190 -0.00000000 -97.27070618 3.71055579 -34.24139786 1.00000000
    19 "Base HumanRUpperarm" 16 12.07224083 0.49239814 2.86002088 0.62274450 -0.37666160 -0.35884857 0.58441681 -0.25598934 0.17220861 0.95121676 -0.00000000 -0.96540350 -0.09608735 -0.24241148 0.00000000 0.04965457 -0.98036289 0.19084814 -0.00000000 88.33203888 7.03293896 37.05961609 1.00000000
    20 "Base HumanLForearm" 17 15.58138180 -0.02191406 -0.00315852 0.07171223 0.13759322 0.00453828 0.98787898 0.75580341 -0.61896622 0.21364003 -0.00000000 -0.62977690 -0.77647448 -0.02164333 0.00000000 0.17928250 -0.11818744 -0.97667259 -0.00000000 34.57137680 77.50718689 -9.38010883 1.00000000
    21 "Base HumanRForearm" 19 15.60024643 -0.00524144 -0.02891417 -0.07215801 0.00093863 -0.00010060 0.99739277 -0.25781399 0.03348053 0.96561426 -0.00000000 -0.96491921 -0.06025701 -0.25553906 0.00000000 0.04962945 -0.99762130 0.04784109 -0.00000000 72.66040039 1.63110983 37.85255432 1.00000000
    22 "Base HumanLPalm" 20 17.51617241 -0.03595767 0.01252518 -0.71693021 -0.00388783 -0.02267426 0.69676524 0.77921391 -0.16735397 -0.60400206 -0.00000000 -0.60972530 0.02073179 -0.79234165 0.00000000 0.14512353 0.98567891 -0.08588541 -0.00000000 14.66301823 7.76693487 78.20940399 1.00000000
    23 "Base HumanRPalm" 21 17.51621437 0.00004118 0.00001042 0.68282509 0.04664504 -0.04684859 0.72758460 -0.38303143 0.92335331 0.02655859 -0.00000000 -0.92252117 -0.38384348 0.04023848 0.00000000 0.04734868 -0.00908828 0.99883717 -0.00000000 49.66381836 44.82082367 0.97745878 1.00000000
    meshes:2
    mesh:"Hoplite"
    vertices
    -9.30671692 90.16596985 -4.32853985 -0.71065402 -0.69670707 -0.09744560 0.01512593 0.43480241 19 19 19 19 255 0 0 0
    -12.58467007 95.39512634 -9.57664776 -0.00619526 -0.71028781 -0.70384836 0.02444829 0.49736971 19 19 19 19 255 0 0 0
    -11.97171974 96.30706787 -10.50234985 -0.00619526 -0.71028781 -0.70384836 0.03104611 0.49475741 19 19 19 19 255 0 0 0
    -11.25718021 88.50823975 -3.58377004 0.72344124 -0.20023194 -0.66066468 0.23053309 0.08515686 19 19 19 19 255 0 0 0
    -12.07303047 82.96025085 -2.79566312 0.72344124 -0.20023194 -0.66066468 0.25746280 0.08242160 19 19 19 19 255 0 0 0
    -16.74352074 84.45942688 -8.36432552 0.22235785 -0.24338511 -0.94409007 0.25802580 0.14297432 19 19 19 19 255 0 0 0
    -12.58467007 95.39512634 -9.57664776 0.70931119 -0.22556230 -0.66780603 0.21029539 0.16229039 19 19 19 19 255 0 0 0
    -9.30671692 90.16596985 -4.32853985 0.70931119 -0.22556230 -0.66780603 0.21515299 0.09260041 19 19 19 19 255 0 0 0
    -13.83549023 91.99358368 -9.75614834 0.70931119 -0.22556230 -0.66780603 0.22407959 0.15308142 19 19 19 19 255 0 0 0
    -13.83549023 91.99358368 -9.75614834 -0.59852898 0.39381084 -0.69759208 0.22407959 0.15308142 19 19 19 19 255 0 0 0
    .....
    11.41438007 78.61196899 -88.04606628 0.10293894 -0.20017090 -0.97433394 0.19256370 0.92008460 2 2 2 2 255 0 0 0
    12.20086002 74.44640350 -87.10710907 0.10293894 -0.20017090 -0.97430342 0.20255210 0.92008470 2 2 2 2 255 0 0 0
    8.24510384 76.82424927 -88.01365662 -0.18292795 0.95886105 -0.21701711 0.19256370 0.89931240 2 2 2 2 255 0 0 0
    triangles
    0 1 2
    3 4 5
    6 7 8
    9 10 11
    10 12 13
    14 15 10
    16 10 5
    5 10 17
    5 18 19
    20 21 22
    22 23 20
    20 23 24
    25 26 27
    27 28 25
    29 25 28
    ....
    35 31 30
    31 35 36
    36 32 31
    32 36 26
    26 25 32
    37 38 39
    39 40 37
    40 39 41
    41 42 40
    42 41 43
    43 44 42
    end
     
  4. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,260
    Location:
    London, UK
    Reserved for more information 3
     
  5. S3rgeus

    S3rgeus Chieftain

    Joined:
    Apr 10, 2011
    Messages:
    1,270
    Location:
    London, United Kingdom
    Thanks for the upload, looks like an awesome new tool, but it crashes on load for me. I run the NexusBuddy2.0.exe application and nothing comes up, then Windows sends a crash report to Microsoft after a few seconds. This can run in its own folder, extracted to anywhere, right? (It doesn't have to be next to Nexus like the old one?)
     
  6. Wolfdog

    Wolfdog Unit Butcher

    Joined:
    Jun 29, 2012
    Messages:
    636
    Location:
    Australia
    Awesome Deliverator, I had a bit of play with the battleship.gr2 and all very nice. Now I am going to have to learn how to do multi-mesh units. Hopefully not to much of a difference to single mesh.:high5:

    Yes, I just extracted it into a random folder I downloaded to and it worked straight up.
     
  7. Nutty

    Nutty Chieftain

    Joined:
    Mar 9, 2011
    Messages:
    3,148
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    Ditto here.

    Code:
    Problem signature:
      Problem Event Name:	CLR20r3
      Problem Signature 01:	nexusbuddy2.0.exe
      Problem Signature 02:	0.0.0.0
      Problem Signature 03:	51a34f7c
      Problem Signature 04:	mscorlib
      Problem Signature 05:	4.0.30319.18033
      Problem Signature 06:	50b5a536
      Problem Signature 07:	260a
      Problem Signature 08:	12
      Problem Signature 09:	System.NotSupportedException
      OS Version:	6.2.9200.2.0.0.256.48
      Locale ID:	1033
      Additional Information 1:	5861
      Additional Information 2:	5861822e1919d7c014bbb064c64908b2
      Additional Information 3:	f3d5
      Additional Information 4:	f3d5be0cad2787556264647dc02181c3
     
  8. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,260
    Location:
    London, UK
    Yes, it's designed to installed and run from any location - it doesn't need to be next to Nexus.

    I'm still new this whole C# thing, but my best guess, seeing as it it's working for Wolfdog, is that you need to have a later .NET runtime installed. Try installing .NET Framework 4.0.

    Or it could be this - something to do with the referenced assemblies (DLLs) that either need to be present or set to CopyLocal=true.
     
  9. Wolfdog

    Wolfdog Unit Butcher

    Joined:
    Jun 29, 2012
    Messages:
    636
    Location:
    Australia
    If it helps I have dot net 4.0 installed and the SDK on a windows 7 x64 machine.
     
  10. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,260
    Location:
    London, UK
    That's exactly my set-up too. It shouldn't be necessary to have the SDK installed too though - I'll have a look into it when I'm home.

    This is the link to the Windows 7 SDK and .NET Framework 4.
     
  11. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,260
    Location:
    London, UK
    I've uploaded the download. The only change is that all referenced DLLs are now included.
     
  12. Nutty

    Nutty Chieftain

    Joined:
    Mar 9, 2011
    Messages:
    3,148
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
  13. S3rgeus

    S3rgeus Chieftain

    Joined:
    Apr 10, 2011
    Messages:
    1,270
    Location:
    London, United Kingdom
    Still no luck for me. :( I'll try my Win8 machine next though. I'm running win7 64-bit with .NET 4.0 installed too. I've configured the drives a bit unusually on this machine though. If there are any absolute file paths in the DLL references in the project then it probably won't load for me. Annoyingly, the only way I found to do relative file paths to referenced .dlls in visual studio was to manually edit the project file. Then you need the .dlls to be in your build output directory for it to keep working when you run it from Visual Studio, but that should be the case if you've built it at least once before in your active profile (and haven't done a clean).
     
  14. Ekmek

    Ekmek on steam: ekmek_e

    Joined:
    Aug 7, 2002
    Messages:
    6,045
    Location:
    San Diego, California
  15. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,260
    Location:
    London, UK
    It makes sense that the problem is absolute file paths for .dlls. Did you edit the .csproj file? That's the only place I can see absolutes:

    Code:
        <Reference Include="Firaxis.Framework">
          <HintPath>..\..\..\Program Files (x86)\Steam\steamapps\common\sid meier's civilization v sdk_latest\Nexus\x86\Firaxis.Framework.dll</HintPath>
        </Reference>
        <Reference Include="Firaxis.Framework.FirePlace">
          <HintPath>..\..\..\Program Files (x86)\Steam\steamapps\common\sid meier's civilization v sdk_latest\Nexus\x86\Firaxis.Framework.FirePlace.dll</HintPath>
        </Reference>
        <Reference Include="Firaxis.Framework.Granny">
          <HintPath>..\..\..\Program Files (x86)\Steam\steamapps\common\sid meier's civilization v sdk_latest\Nexus\x86\Firaxis.Framework.Granny.dll</HintPath>
        </Reference>
        <Reference Include="Firaxis.Framework.Granny.ImplWin32">
          <HintPath>..\..\..\Program Files (x86)\Steam\steamapps\common\sid meier's civilization v sdk_latest\Nexus\x86\Firaxis.Framework.Granny.ImplWin32.dll</HintPath>
        </Reference>
    Here's my latest source code/project files if you want to see if you can fix the issue yourself.
     
  16. S3rgeus

    S3rgeus Chieftain

    Joined:
    Apr 10, 2011
    Messages:
    1,270
    Location:
    London, United Kingdom
    Yes, when I was deploying the Tech Tree Editor, I changed those in the .csproj file to just say "Firaxis.Framework.dll" etc. instead of having the whole file path.

    EDIT: Woops, didn't read properly, I'll open up the source now.
     
  17. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,260
    Location:
    London, UK
    From what I can tell you can just delete the HintPath tag completely.
     
  18. S3rgeus

    S3rgeus Chieftain

    Joined:
    Apr 10, 2011
    Messages:
    1,270
    Location:
    London, United Kingdom
    That may work too. I've just tested changing the hint paths to relative paths and NexusBuddy 2.0 works on both my computers now! :D Win8 and Win7, both 64 bit.

    I've attached a recompiled version. The only thing I changed was the DLL hint paths and for some reason I had to add this to "App.config" get it to compile on my computer:

    Code:
      <runtime>
        <loadFromRemoteSources
       enabled="true"/>
      </runtime>
    Great work, Deliverator! This tool is pretty awesome, I'm gonna try out custom feature art right away. Great idea including granny viewer btw, I was never able to find a copy of that program!
     

    Attached Files:

  19. GeoModder

    GeoModder Chieftain

    Joined:
    Nov 29, 2005
    Messages:
    7,512
    That's weird. I managed to open community-made .gr files (the modern carriers and a dutch paratrooper unit) in both the granny editor and the granny viewer, but Firaxis' .gr files only open in the editor, and crash when I try to see them in the viewer.
    But the Civ5 unit was from an .fpk extraction back when the game came out. Has the file format somewhat changed since G&K came out?
     
  20. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,260
    Location:
    London, UK
    I should have pointed out that you need to save the Firaxis gr2 before using Granny Viewer. You can either overwrite the unpacked one using Save or use Save As to give it a new name.
     

Share This Page