Jump to content


Replying to Corsix Macros - for faster AE management and checks...


Post Options

    • Can't make it out? Click here to generate a new image

  or Cancel


Topic Summary

Gambit

Posted 15 September 2019 - 04:21 PM

That is helpful to know although are there instances where the Origin.z is larger than Muzzle.z BUT no CTD occurs...

It seems to be related to ranged weapons that fire projectiles.

-- it just becomes more the barrel faces incorrectly OR the projectile fires the wrong way?

Well, it MAY be related to wrong facing, for example if the engine cannot handle the model. We had a similar issue with the random_aim_on_create weapon stat, set to [true] for the turret in SL, that was giving a random CTD.

 

But to be sure, let's have it properly coded for ALL our weapons  :thumbsupcool:

 

Here:

-- Run over the ebps/races/race_name folder of the race in question.
-- Returns the entities with muzzles that are less than origins (CTD reason!)

function each_file(rgd)
    if rgd.GameData.combat_ext ~= nil
        for i=1,15
            for j=1,15
                local wn = rgd:GET("GameData","combat_ext","hardpoints","hardpoint_0"..tostring(i),"weapon_table","weapon_0"..tostring(j),"weapon")
                if wn ~= nil and wn ~= "" then
                    local origin = rgd:GET("GameData","combat_ext","hardpoints","hardpoint_0"..tostring(i),"weapon_table","weapon_0"..tostring(j),"origin","z")
                    local muzzle = rgd:GET("GameData","combat_ext","hardpoints","hardpoint_0"..tostring(i),"weapon_table","weapon_0"..tostring(j),"muzzle","z")
                    if origin >= muzzle then
                        print(rgd.name:before(".rgd").."  Hardpoint:"..i.."  Weapon:"..j)
                    end
                end
            end
        end
    end
end

function at_end()
    print("Done!")
end

It is really simple, but effective :grad:


thudo

Posted 14 September 2019 - 02:16 PM

That is helpful to know although are there instances where the Origin.z is larger than Muzzle.z BUT no CTD occurs -- it just becomes more the barrel faces incorrectly OR the projectile fires the wrong way?


Gambit

Posted 14 September 2019 - 09:28 AM

OK, just to say that, during my countless AEing times, it became apparent that some Macros would have shorten the required time for many tasks, .... By A LOT!!

So if you are interested, I can share some Macros.

 

The reason I posted this, is a CTD reason, common to all projects:

The Origin.z being larger that the Muzzle.z in the combat_ext of entities.

 

I had a CTD in the Imperial Fists because of that, and instead of searching the entities one-by-one, I created a Macro that does that for me.

 

Anyway, you got the idea.


Review the complete topic (launches new window)