Revamp Expansion Mod (RVE) The Ultimate Supreme Commander 2 Experience (New Scale, New Units, New Ability's, New Game)

Forum Thread
by member
  Posts  
Projectiles...Again...(Ugh.) (Mods : Revamp Expansion Mod (RVE) : Forum : Mod Creation Help : Projectiles...Again...(Ugh.)) Locked
Thread Options
Apr 24 2013, 7:54pm Anchor

I hate to do this, both for my sake and yours, but....oh well..

I just tried my 3rd real attempt at adding a new projectile, and though I have made progress, I haven't made enough. My projectile seems to be appearing now, but the effects don't. (What I mean is, you can see the yellow dot that represents the projectile when you zoom out, but when you zoom in, the projectile has no effects.) To be specific, I'll put everthing I've got (well, not EVERTHING) here.

Pastebin.com  This is the projectile (called IOhCannon01) blueprint. Script:

IOhCannon01 = Class(import('/lua/sim/Projectile.lua').Projectile) {
}
TypeClass = IOhCannon01

Then the effect template (in z_lua_dlc1.scd):

UnitPortEffectTemplates = {
    Weapons = {
        IOhCannonProjectileTrail = {
            '/effects/emitters/weapons/illuminate/IOhCannon01/projectile/w_i_IOhCannon01_p_01_emit.bp',
            '/effects/emitters/weapons/illuminate/IOhCannon01/projectile/w_i_IOhCannon01_p_02_emit.bp',
        },
        IOhCannonHit = {
            '/effects/emitters/weapons/illuminate/IOhCannon01/impact/unit/w_i_IOhCannon01_i_u_01_emit.bp',
            '/effects/emitters/weapons/illuminate/IOhCannon01/impact/unit/w_i_IOhCannon01_i_u_02_emit.bp',
            '/effects/emitters/weapons/illuminate/IOhCannon01/impact/unit/w_i_IOhCannon01_i_u_03_emit.bp',
            '/effects/emitters/weapons/illuminate/IOhCannon01/impact/unit/w_i_IOhCannon01_i_u_04_emit.bp',
        },
        IOhCannon_Launch_01 = {
            '/effects/emitters/weapons/illuminate/IOhCannon01/launch/w_i_IOhCannon01_l_01_emit.bp',
            '/effects/emitters/weapons/illuminate/IOhCannon01/launch/w_i_IOhCannon01_l_02_emit.bp',
            '/effects/emitters/weapons/illuminate/IOhCannon01/launch/w_i_IOhCannon01_l_03_emit.bp',
            '/effects/emitters/weapons/illuminate/IOhCannon01/launch/w_i_IOhCannon01_l_04_emit.bp',
        },
    },
}

EffectTemplates = table.merged(EffectTemplates, RevampEffectTemplates, UnitPortEffectTemplates)

The actual bp files in /effects/emitters/[the rest] I haven't touched. I have just copied and pasted all of the particles in FA to /textures/particles in my own .scd, so particle paths should not be a problem.

If I had a lot of money to bet, I would bet it all on a typo...

Edited by: ALBINOsnowball

Apr 26 2013, 5:35am Anchor

Instead of

Someone wrote:EffectTemplates = table.merged(EffectTemplates, RevampEffectTemplates, UnitPortEffectTemplates)

Just try

Someone wrote:EffectTemplates = table.merged(EffectTemplates, UnitPortEffectTemplates )

You dont need to merge with revamp as it merges with the default EffectTemplates file as well, Let me know how that goes.

Edited by: OverRated

Apr 26 2013, 2:39pm Anchor

And...It crashed! Back to square one....

This goes to show how much I know about lua, but does teh space between "UnitPortEffectTemplates" and ")" really need to be there? That's the only problem I can think of

EDIT: The muzzle flash and impacts are working (YES) but the projectile is still not showing up. I sort of assumed that the projectile emitters were the "polytrails", but...are they?

And to further the fun, how do you change the size of the muzzle flash? At least, is there a way in the code to do it?

EDIT 2: Okay, I pretty much have projectiles showing up and working. My only question left on this subject is how to make the muzzle flash effects smaller/larger.

Apr 26 2013, 11:07pm Anchor

Seeing your using Revamp you can add this line below to the units weapon table Revamp also support ImpactEffectScale + ProjEffectScale, Just a heads up though 1.2 works a little diffrent so you will need to change this when moving your units over to 1.2 .

Someone wrote:MuzzleFlashEffectScale = 1,

Edited by: OverRated

Apr 27 2013, 12:03am Anchor

Ah, thank you. Now, may I encourage you to take a look at my other unanswered thread about the tech toggle? (You may want to consider going to an insane asylum after all my questions :) )

As for 1.2, as soon as that comes out, I will pretty much stop porting units and will only try to make bug fixes. Why would I port old, badly textured units when 1.2's will be a [insert large number here] times better?

Apr 27 2013, 9:14am Anchor

HAHA i dont know maybe to add some think more :)

Reply to Thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.