The Forums Are Now Closed!

The content will remain as a historical reference, thank you.

Blueprinter Mesh Problems with bad work around.

By on January 3, 2010 1:13:29 PM from Demigod Forums Demigod Forums

mrappard

Join Date 04/2009
+24

 

Having a problem with adding new Models/Textures/Demigods to the game.

I can make new Blueprint files easily but if I change the table 

 

   Display = {

        Character = 'NEW VALUE',

        IconName = '/units/grunts/garcher01/garcher01_icon.dds',

        LoopingAttack = true,

        MouseOverIcon = 'siegearcher.dds',

        #UniformScale = 0.02,

    },

 

 

to reference a _character file in the MOD folder for example. SniperX_Character.lua it will give a NUL value for the Mesh even if I change the name to NEW VALUE. And thus the game will crash or the ability will not function.  

 

BUT If I place SniperX_Character.lua in the Bindata directory outside the MOD folder it work fine. So if I placed it in \bindata\characters work perfectly. The reason being that if I place it in that folder Demigod loads the file with the other standard LUA files. 

Is there a better work around.

Locked Post 10 Replies
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
January 3, 2010 2:27:00 PM from Demigod Forums Demigod Forums

If you can post what you have currently, I will take a look.

Reason for Karma (Optional)
Successfully updated karma reason!
January 4, 2010 11:02:20 PM from Demigod Forums Demigod Forums

http://67.55.41.251/Demigod/FavormodSniperX.rar

Is the link I was working on. If you use the Favor Commando Idol the one that looks like the Siege Archer 2 Icon it will not summon anything. But if you but the file marked, "THESE GO IN bindata Char" in the characters directory outside of the Mod folder it summon guys like the image above. 

Reason for Karma (Optional)
Successfully updated karma reason!
January 5, 2010 12:36:08 AM from Demigod Forums Demigod Forums

do you mean the "Holy Idol"...because even when I place the 2 files ( SniperRed_MESH.bp and SniperX_Character.lua ) in the bindata/characters folder, no character will load ( and I get an error about not being able to find siegearcher_MESH in the mods/favormod.../siegearcher folder. )

Reason for Karma (Optional)
Successfully updated karma reason!
January 5, 2010 12:49:18 AM from Demigod Forums Demigod Forums

C:\Program Files (x86)\Stardock Games\Demigod\bindata\characters\sniper folder

Reason for Karma (Optional)
Successfully updated karma reason!
January 5, 2010 1:11:13 AM from Demigod Forums Demigod Forums

aha. That makes a big diff:) Now that I know what I'm trying to do, things should go a little better. I have 2 things so far though:

You are aware of the bone aborting, blaw blaw yaw bone issues error, correct?

Second: When hooking a previous file, only include tables that have been modified. ES: The BuffAffects.lua contains everything still...I have no idea atm what was and was not modified, but more importantly: This can cause mod incompatabilities when they should be able to work together.

I'll let ya know what else I can find in awhile.

Reason for Karma (Optional)
Successfully updated karma reason!
January 5, 2010 3:29:04 AM from Demigod Forums Demigod Forums

OK. Main problem solved:

I placed the 2 files into /mods/Favormod/hook/characters/Sniper/

First problem was the fact that the SniperX_Character.lua file was not being loaded. This is because these files are loaded during initialization. Simply add:

import('/mods/Favormod/hook/characters/Sniper/SniperX_Character.lua')

at the top of AchievementItems.lua to load it.

Next you need to update the SniperX_Character.lua file with the new mesh location:

        '/mods/Favormod/hook/characters/Sniper/SniperRed_MESH',

and last, but not least: Because the mesh files are not lua, they are not seen as in the same folder as the mod folder. So, just like icons, you must get out of the current directory and into the correct one. In SniperRed_MESH.bp, for each of the meshes, under MeshName add:

../../../../../characters/Sniper/

in front. So, for example, for the first mesh you should have:

            MeshName = '../../../../../characters/Sniper/Sniper_MESH.gr2',

Once you have done this for all 12 meshes, you should be set. However, there is still the turret yaw bone issue to work out...but it's almost 3:30 am here, so I think I'll call it a night:)

Ohh, and you can download what I have so far at:

http://www.imperiuminferi.com/DG/Favormod.zip

Reason for Karma (Optional)
Successfully updated karma reason!
January 5, 2010 5:25:53 PM from Demigod Forums Demigod Forums

I have most of the problems fixed now. I did find some new issues. There are still some instances where the animations go a little weird (Such as firing, and still on most deaths there is a problem with the weapon. ) , and they seem to have gained the ability to walk through walls...no idea on that one atm:(

So, on to the changes!

First up was SiegeArcher05_Script.lua

 Changed AttachEffectsAtBone in OnCreate to:
 AttachEffectsAtBone( self, EffectTemplates.Archer.SiegeAmbient01, 'sk_Sniper_Leftwingstub', nil, nil, self.TrashOnKilled )
 AttachEffectsAtBone( self, EffectTemplates.Archer.SiegeAmbient01, 'sk_Sniper_Rightwingstub', nil, nil, self.TrashOnKilled )

The actual model file is that of Regulus, not a SiegeArcher. So I used his bones, which the main ones for attaching effects to are his wingstubs. You can adjust these for the right bones/effects, just make sure you are using bones from the reg models.

Next I added a new function after oncreate, this was done because on death his bones were not in the proper state for the death animation, which caused weird things. Still have some of the problems, such as what happens to the bolter. ARGH.

     OnKilled = function(self)
         MinionUnit.OnKilled(self)
         self:ShowBone("sk_Sniper_Leftwing1", true)
         self:ShowBone("sk_Sniper_Rightwing1", true)
         self:ShowBone("sk_Sniper_Wingsbase", true)
         self:HideBone("sk_Sniper_Leftwingstub", true)
         self:HideBone("sk_Sniper_Rightwingstub", true)
         self:HideBone("sk_Sniper_Wingstubsbase", true)
     end,

Next we move over to SiegeArcher05_unit.bp

 MuzzleBones changed to: 'sk_Sniper_Turret_Muzzle_REF'

This is the bone that weapon effects are attached to, and needed to reference one from the reg model.

Next after MuzzleBones I added:

     MuzzleEffect = {
                Base = 'Projectiles',
                Template = 'Boulder01',
            },

This actually handles the effect and is required for all of it to work properly.

and last up I set:

 TurretBoneMuzzle, TurretBonePitch, and TurretBoneYaw changed to: 'sk_Sniper_Root"

so they reference a bone on the reg model.

The download is:

http://www.imperiuminferi.com/demigodftp/Mrappard/Favormod/Favormod.zip

Check out my post at https://forums.demigodthegame.com/372358 on how you can access the ftp on my website for uploads, downloads, pics, etc.

Going to take a break from this one for a bit now though. I just spent about 3 hours working on that:)

Reason for Karma (Optional)
Successfully updated karma reason!
January 5, 2010 5:39:03 PM from Demigod Forums Demigod Forums

That more then enough. I appericate the effort all I really needed to know was the importing function the rest is just candy.

Reason for Karma (Optional)
Successfully updated karma reason!
January 6, 2010 12:19:37 AM from Demigod Forums Demigod Forums

and they seem to have gained the ability to walk through walls...no idea on that one atm:(

This is caused because they are assisgned into the unit table as minions, if you have a look ingame all minions (not reenforcements) can pass through walls.

Also GW!

Reason for Karma (Optional)
Successfully updated karma reason!
January 6, 2010 2:06:42 PM from Demigod Forums Demigod Forums

Quoting Exxcentric,

and they seem to have gained the ability to walk through walls...no idea on that one atm:(


This is caused because they are assisgned into the unit table as minions, if you have a look ingame all minions (not reenforcements) can pass through walls.

Also GW!

I was wondering if it was all minions...obviously I'm an assassin person:) I guess that was done to remove collision calculations to be easier on the cpu.

BTW: Mrappard, I added a folder to the FTP for you to use for all of your stuff, help keep things organized if you want to use it:)

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #108433  walnut3   Server Load Time: 00:00:00.0001610   Page Render Time: