More Than Disabled Cruise

  • Well, OK then, love me if you must but its really not necessary :?


    Alright Alfa, and anyone else really, as promised :D , heres the file that I have for now, its still not the way I would like it to be but it doesn't look phoney at least.


    I've realized that the way FL draws beams (or projectiles) for weapons means that a projectile from a weapon will never look OR draw like the tractor effect. It'll take too long to fully explain why. The screenshot sort of hides this but I don't have FRAPS installed yet (just reformatted), then you could have seen what I mean.


    I will try to implement the animated lightning texture from the tlr_powerout.ale (from which I've discovered a jump tunnel effect and now lightning discs!) if I can get Firekisse's method for *true* beam effects to work, perhaps he could elaborate....


    Anyway, the projectiles are basically "balls", it you turn your ship or weapons while firing you will see, it does look good though, much nicer than when I tried to make it a "beam" type. I've only worked on it last night and a bit this morning so if anyone else here can decode the tale (its still a valid effect) and see if they could help, I would be most grateful.


    This is for the weapons_ale.ini:


    [VisEffect]
    nickname = lightning_spark
    alchemy = fx\weapons\lightning_spark.tale
    effect_crc = -3854478259
    textures = fx\lightning2.txm


    This is for the effects.ini:


    [Effect]
    nickname = electro_flash
    effect_type = EFT_MUZZLE_FLASH
    vis_effect = gf_misc_miningship_sparks


    [Effect]
    nickname = electro_hit01
    effect_type = EFT_DAMAGE_SHIELD
    vis_effect = gf_misc_miningship_electricity02


    [Effect]
    nickname = lightning_spark_proj
    effect_type = EFT_WEAPON_LARGE_PROJ
    vis_effect = lightning_spark


    And the weapon entries for weapon_equip.ini:


    [Munition]
    nickname = electro_ammo
    hp_type = hp_gun
    requires_ammo = false
    hit_pts = 2
    hull_damage = 0
    energy_damage = 100000
    ;weapon_type = W_EMP
    ;one_shot_sound = fire_electro1
    munition_hit_effect = electro_hit01
    const_effect = lightning_spark_proj
    lifetime = 1
    force_gun_ori = false
    mass = 1
    volume = 0.000000


    [Gun]
    nickname = electro_gun
    ids_name = 470009
    ids_info = 470009
    DA_archetype = Equipment\models\weapons\no_fighter_gun.cmp
    ;material_library = equipment\models\hardware.mat
    HP_child = HPConnect
    hit_pts = 4215
    explosion_resistance = 1.000000
    debris_type = debris_normal
    parent_impulse = 20
    child_impulse = 80
    volume = 0.000000
    mass = 1
    damage_per_fire = 0
    power_usage = 1
    refire_delay = -1
    muzzle_velocity = 800
    use_animation = Sc_fire
    toughness = 8.500000
    flash_particle_name = electro_flash
    flash_radius = 15
    light_anim = l_gun01_flash
    projectile_archetype = electro_ammo
    separation_explosion = sever_debris
    auto_turret = false
    turn_rate = 90
    lootable = false
    LODranges = 0, 20, 40, 80, 100


    I commented out the weapon_type = W_EMP and one_shot_sound = fire_electro1 cause I really don't wanna post all that stuff as well, and possibly have to explain it too, :D Power usage should be really high imho, but this is still incomplete so for testing purposes its low. Refire rate is -1 (no delay) but that still didn't solve my problem :( .


    I'm sure you guys can do the weapon_good and market files yourselves ;)

  • Aden thanks so much for sharing your effect with us, u're surely a .ale god.
    I will place u on top of my credis once i get a working alpha.


    Not sure if u are in a modding team somewhere but i would be very glad to recruit u.
    If u are in a modding team still a BIG THANKS for the effect i will use it for different weps.

  • You're welcome, glad I could be of value to your day, do come again. :lol:
    Oh, and don't call me a god. Its not cricket. ;)


    @ Alfa, you're talkin bout editing the ale right? Not the goods and market entries?

  • Actually, I don't know anything about .ale's (currently learning), but I was making a joke about the goods files. I definitely know how to do those. I even combined all of them and their equip files into one.

  • Ha, I knew it was a joke!


    So you combine your ini's hey, hmm. I split mine LOL, probably not the best idea but I have turrets in a seperate ini and explosive weapons also have their own (have you seen how much weapons are in the weapon_equip file!) it makes it easier to find stuff. I also rearanged st_equip and most equip files actually. :D


    @ Oblivion, the visual is almost there but I was under the impression you had achieved a sort of power damage but just weren't sure how?

  • Either way is good, if nothing else, I kinda like your way of separating them...hmm, may experiment with this. Anyways, the reason I combined them is to decrease load time.


    As for the mechanics, I've been trying to figure this one out too, and all I've gotten is taking the shields and disabling cruise down, the basics, but nothing else really. Is there another "hidden" line like all the ones for constant.ini that would help us here?

  • Quote from "aden"

    @ Oblivion, the visual is almost there but I was under the impression you had achieved a sort of power damage but just weren't sure how?


    Oh I know how to cause power damage, that part is easy. The difficult part is keeping it down enough so the engines and weapons don't have enough energy to function.


    Just ran a test where I turned this weapon into a mine (so it would hit me), fired a stream of them while moving and it killed my shields and energy but never made me slow down, and yes, I had the engine set to use energy. The power plant just generates power too quickly. The only way to make the ship slow down is if the power plant generates energy slower than the engine uses it, so there's no feasible way to get this to work without the power supply actually going offline, unless there is something that's using so much energy only when being shot by an ionic current weapon that it leaves no power for the engine, weapons, or anything that uses power.


    About that, I have a theory. Has everyone heard about how, if you put negative energy usage values on a shield, it becomes a power generator? I have, and I just tested it, and it indeed does work that way, with both constant_power_draw and rebuild_power_draw. Basically what we can do, is create a shield with this code:


    [ShieldGenerator]
    nickname = powergen_shield
    ids_name = 0 ;GENERATESTRRES(powergen_shield_name)
    ids_info = 0 ;GENERATEXMLRES(powergen_shield_info)
    DA_archetype = equipment\models\st\li_refractor_shield.3db
    material_library = equipment\models\li_equip.mat
    HP_child = HpConnect
    hit_pts = 999999999 ;999,999,999
    explosion_resistance = 0.900000
    debris_type = debris_normal
    parent_impulse = 20
    child_impulse = 80
    volume = 0
    mass = 0
    regeneration_rate = 100000000 ;100,000,000
    max_capacity = 100000000 ;100,000,000

    toughness = 11.200000
    hp_type = hp_fighter_shield
    offline_rebuild_time = 0.000001
    offline_threshold = 0.150000
    constant_power_draw = 0
    rebuild_power_draw = 100000 ;100,000
    shield_type = S_Graviton01
    shield_collapse_sound = shield_offline
    shield_rebuilt_sound = shield_rebuilt
    shield_hit_effects = 0, gf_br_shield01
    shield_hit_effects = 100, gf_br_shield02
    shield_hit_effects = 500, gf_br_shield03
    separation_explosion = sever_debris
    LODranges = 0, 20
    lootable = true


    Don't be confused about the insanely high numbers, I'm about to explain those. Basically, we're making an invincible shield into a power plant; invincible, that is, to everything but the ionic current weapon we're making. Then, on every ship (this is the down side to this idea) we create a second shield whose bounds are entirely on the inside of the ship and therefore can only be hit by an explosion. While this shield isn't being hit, it won't be doing a thing, allowing the regular power plant to do its job uninterrupted. But, once it's hit, the regeneration power draw will overcome the power plant by nearly 100,000 units of power, therefore drawing any and all power that the ship generates into itself, leaving no energy for engines, weapons or anything that uses power.


    The reasoning for the high regeneration rate of this shield is for when you're hit by a regular missile; it will cause some, very little but some, damage to the shield, and that would normally cause your power to disappear. But, because the shield regenerates so quickly it will be drawing all the energy from everything else for but a few milliseconds, not enough time to really damage power reserves.


    Also, if we want to create a "recharge time" where the ship has to take a few seconds to bring itself back online, all we do is set the time the shield generates from 0 to full shield points to that recharge time, as that is how long the regeneration power draw will be in effect. The numbers shown give a one second recharge time.

  • I tested that theory with NPC's with their shield being this shield, and it did seem to work. The problem was once they were hit and had no shields, they automatically used their thruster to move, and that basically gives them the use of their engine for as long as they're using their thruster. Also, it looks as if the power usage priority is first: engines, second: weapons and then third: shields, so they can still use their engines and weapons while the special shield is regenerating and using that 100,000 power draw. If we can change that priority order, then this would work quite well, I think.


    Also, I gave this another thought:

    Quote from "0blivion"

    Also, if we want to create a "recharge time" where the ship has to take a few seconds to bring itself back online, all we do is set the time the shield generates from 0 to full shield points to that recharge time, as that is how long the regeneration power draw will be in effect. The numbers shown give a one second recharge time.

    With those exact numbers, the NPC's shields never even began to regenerate. That recharge time would only be effective if the power supply could generate 100% of the power required by regen_power_draw. If it can only provide, say 90% of it, the shield will only regenerate at 90% the full regeneration rate. So, since the power required to regenerate the shield is 100,000 units of power per second, and the power plant will provide at most 1290 units of power per second (if no engines or weapons are being used on a Titan), that's only a 1.29% regeneration rate, and that's with a Titan. A tiny little Starflier would regenerate at .095% max rate, and that would be a loong recovery time. So, in order for a Starflier to recover in 10 seconds, the regeneration_rate would have to be 10526315789.5. That's over 10 trillion units per second, and that's if the Starflier wasn't using weapons or its engine.

  • Well, I must totally agree with JONG, I had just about given up on the rest and here you come with another angle :shock: .


    Good stuff lad, thats what really makes a modder ;) Not just changing what is already there, but figuring out how to implement new ideas via manipulation of existing code and features.


    I am REALLY trying to make a real lightning beam and am finding it near impossible so I can't give you feedback any time soon.


    Kyk voor en moenie ophou nie!!

  • just curious, but I don't know anything about .ale's so yeah. Could you not take the tractor effect, and move it to a weapon .ale then play with it a little from there?

  • I have tried like you cannot believe to figure that one out. If you check in effects.ini you will see the tractor is set up like so:


    [Effect]
    nickname = tractor_effect
    EFT_TYPE = EFT_TRACTOR_EFFECT
    effect_snd = tractor


    Thats out my head so it might be a wee bit wrong but the trator does not have a vis_effect reference because no _ale.ini has a tractor definition. I have searched the standard_effects.ale as well but nothing.


    Though I remain ever faithful that the source of that effect will someday be uncovered. :D

  • aden and JONG,
    Thanks :D I do my best


    aden ,


    I don't have access to a computer with FL files so I can't check on this myself, but have you checked the effect_types.ini file (I think that's what the right file is) and searched for EFT_TRACTOR_EFFECT to see if the .ale or source of the tractor effect is under there? Just a thought...


    FYI all, I'm heading off to college here so I may not have much time to research how to get the mechanics working. Someone else might want to pick up where I left off, especially with getting a second shield on the ship. That I believe could be done by making another shield hardpoint inside the ship... wait... the only way to get that working is if there's a second .sur file for the shield itself, I believe anyway, and I'm not sure that's possible. It could be that if you just make a new hardpoint and make a second shield_link in shiparch.ini that references that new hardpoint, the one poly that is the hardpoint (does hardCMP create a poly if you create a new hardpoint with it?) could register as the .sur, but I don't think so, it will probably be a second "layer" shield that has the same bounds as the original shield that acts as the .sur, but once again, I can't test that right now and I might not have time to do it later. I hope at least some of that made sense.


    Ok, I was thinking aloud right there (someone might get an idea from it, who knows), and after thinking about my thoughts a bit and my work with .cmp and .sur files came back I think I can explain what has to be done a bit better: if you do create another shield hardpoint and shield_link entry, the hardpoint will be where the physical model of the shield will be, and the actual .sur will be the same .sur as the regular shield, and if this "powerplant shield" I'll call it is put onto that hardpoint that ship will be pretty much invulnerable except to this ionic current weapon, which I'll call the ICED (Ionic Current Emitting Device; "You got ICED!" Speaking of which, does anyone have an official name for this weapon?), because the .sur for that shield will be the only one FL knows to look for, and that encompasses the entire ship. The only way I can think of doing this effectively, and I'm not sure this can be done without advanced .exe hacking, is make a second .sur for the powerplant shield. Again, I have no idea if this is possible, unless... Darn, if I had FL files to look at and modify I could be more sure if this will work, if I'm right then the shield_link line in shiparch.ini has a reference to a .sur that it only pulls the shield part of that .sur, so if we create a shield .sur that is about the size of a weapon and add a second shield_link line to every ship in shiparch.ini that references that new .sur, it is quite possible this could work. Could someone look into that for me? I'll try to work on it when I get access to my computer, but that won't be until Wednesday, and once again I'll be rather busy come then. It could be that FL will only recognize one of the shield .sur's, but maybe not. Definitely worth looking in to.

  • Quote from "0blivion"

    if we create a shield .sur that is about the size of a weapon and add a second shield_link line to every ship in shiparch.ini that references that new .sur.


    As I know, create a shield of sur is easy, but add a second shield_link line to every ship in shiparch.ini is impossible.


    I was try many way to make the ship stop or slow down, but still no luck. :oops:

  • Quote from "JONG"

    but add a second shield_link line to every ship in shiparch.ini is impossible.


    What do you mean, impossible? You go under shiparch.ini and add another line, or are you saying FL doesn't recognize a second shield_link line?


    Once again, I would test this, but I don't have access to a computer. Soz guys, not much I can do about it at the moment.

  • @ Killerboy,


    "With hook?" Do explain, but just to be sure we're on the same page, we do want the target to become active again after being shot with the ICED. Unless I'm badly mistaken of course.


    @ JONG,


    Just so you know, a cruise disruptor will eliminate a ship's ability to engage cruise for 5 seconds and it will also take them out of engine kill. The only way I know of to make someone lose control of basic thrust is to either remove their engines entirely or take away their ability to supply their engines with needed power. As far as a thruster goes, I have no idea how to temporarily disable that, unless you can make it require power, as well, then it would be the same basic principle as removing basic thrust. Again, I don't have any .ini files, but I think you might be able to edit a thruster's code to require power, it might have the line power_usage = 0 in it or something like that, not sure. Dang this is debilitating not having any files to look off of... on a family member's computer so I can't download the .ini backup files.

  • @ 0blivion :


    Sorry for my poor English. :oops:


    I mean that, FL doesn't recognize a second shield_link line, so if you want to add the second shield_link line, it's will not work.


    The thruster always need power to work in game, so we don't need to add "power_usage = 0" line in ini's file.


    Like you say, a cruise disruptor will eliminate a ship's ability to engage cruise, but I think that is hex code in somewhere.


    Think about that, if FL can let us to make engine slow down or stop it, why haven't any mod can do that ?