Jump to content


Photo

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


2 replies to this topic

#1 Gambit

Gambit

    title available

  • Members
  • 6,275 posts
  • Location:Athens, Greece

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.


-In search of Papasmurf...

#2 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 11,598 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

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?


Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#3 Gambit

Gambit

    title available

  • Members
  • 6,275 posts
  • Location:Athens, Greece

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:


-In search of Papasmurf...



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users