- Posts: 6
- Thank you received: 0
Please Log in to join the conversation.
In TPC I have modified the Ancient Defense Satellites to (semi) one-shot targets. The code below can kill an enemy ship with a single shot - but only as long as you don't select a specific hardpoint and select the ship in general. If a weapon like this is used by the AI this will result in a two-shot kill. The first shot will always target a hardpoint while the second shot kills the ship.orrila wrote: 1. the hypervelocity gun gets around this, but I couldn't figure out how. Someone said it makes all hitpoints take damage, but I couldnt find how that works.
<Projectile Name="Proj_Ancient_Superlaser_Strong">
<Variant_Of_Existing_Type>Proj_Ancient_Superlaser</Variant_Of_Existing_Type>
<Projectile_Category>DEFAULT</Projectile_Category>
<Projectile_Damage>9999999.0</Projectile_Damage>
<Projectile_Does_Shield_Damage>No</Projectile_Does_Shield_Damage>
<Projectile_Does_Tactical_Health_Damage>Yes</Projectile_Does_Tactical_Health_Damage>
<Projectile_Does_Hitpoint_Damage>Yes</Projectile_Does_Hitpoint_Damage>
<Projectile_Damages_Random_Hard_Points>No</Projectile_Damages_Random_Hard_Points>
<Projectile_Acceleration_Per_Frame>0.0</Projectile_Acceleration_Per_Frame>
</Projectile>I don't think there is a way around this. However you could attach an Object Script to the unit forcing it to fire the ability. It would be similar to the auto-usage of abilities in FoC except you couldn't turn it off.orrila wrote: 2. the eclipse superlaser gets around this, I was trying to make it a normal weapon and give it to ori with ori beam effect, but couldn't figure out how to rip off super laser code to normal weapon code (rather than special ability).
If you install the EaW map editor/mod tools you'll see a new mod called "source". It contains nearly all of the lua scripts in a decompiled form.orrila wrote: 3. I found the sheet of lua commands, and unitobject.Take_Damage(int x) should make the whole ship take damage rather than harpoint, but I have no way how to make the ori beam use that command (base game lua files are compiled, and nothing to do with weapon firing in the SG EAW or TPC lua files that I can see).
You mentioned the cons by yourself. I agree, it wouldn't work well.orrila wrote: 4. Using an area-of-effect blast, [...]
You might be onto something here. I never looked into it, but the Zann weapon uses a special hardpoint to fire. But I'm not sure whether this would work in EaW too, a few things simply require the expansion.orrila wrote: 5. It seems the zann consortium space station weapon and capital ship weapon get past it by not targeting hardpoints, but hitting a random place on the ship, but I could see of no way to make the ori weapon not hit a hardpoint.
Please Log in to join the conversation.
<Projectile_Does_Tactical_Health_Damage>Yes</Projectile_Does_Tactical_Health_Damage><Projectile_Acceleration_Per_Frame>0.0</Projectile_Acceleration_Per_Frame><Projectile_Damages_Random_Hard_Points>No</Projectile_Damages_Random_Hard_Points><Projectile_Does_Shield_Damage>No</Projectile_Does_Shield_Damage>Please Log in to join the conversation.
Not really, I can't remember where I copied it from. You can try to leave it out and see if you notice any difference.orrila wrote: this line was nowhere to be found in any other file (inc FOC XML's), you sure it exists as a tag? :
I think that's a legacy line that I forgot to delete when I copied the code from the ecplise. Not sure what it does either.orrila wrote: And this wasn't in any of the EAW files (I don't know what this does, I saw some stuff about frames when looking at eclipse super laser code):
Yeah, you need to learn a few eaw-specific stuff to get it working.orrila wrote: I have been perusing the lua files, but at the moment they don't mean a lot to me.
You'd be surprised how many thing you can't do. You often have to work with crude workarounds...orrila wrote: I am surprised there is not some function which gets the current target of the AI or the player.
Thank you! Glad some people find it useful:)orrila wrote: Also, Locutus, I have just looked at the modding tool collection link in your signature, and I would like to thank you for that, it is incredibly useful
Please Log in to join the conversation.
You are welcome, thanks for liking it, Im really happy anyone is able to appreciate it ^^I am giving the tutorial made by Imperial a read (which looks great, thanks or writing it!)
Cool I love Carters Addon Pack!and have done a bit of tweaking with lua for the garrysmod addon "Carters Addon Pack"
You may want to have a look at ultimate eaw's repository how lua is used to influence the game:I just am lacking context for how the engine works and interfaces with the lua I think [there also aren't loads of examples doing what I want to do]
I didn't noticed it as well when I started modding some years ago.but never realized it had source code
I guess so.Also, I have always taken the following line to mean that it will damage the hard points you aim at if yes, and damage randoms ones if no, is that correct?
If no the particle can evade the shields and do direct damage to the Hull/Hardpoints, if yes it does damage to the shields instead.And why is <Projectile_Does_Shield_Damage>No</Projectile_Does_Shield_Damage>, or does it not matter?
I guess this is just another value for projectile speed.<Projectile_Acceleration_Per_Frame>0.0</Projectile_Acceleration_Per_Frame>
Please Log in to join the conversation.