Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   Star Wolves (http://forum.fulqrumpublishing.com/forumdisplay.php?f=138)
-   -   Is this modification possible. (http://forum.fulqrumpublishing.com/showthread.php?t=17547)

Goumindong 12-04-2010 01:05 AM

Is this modification possible.
 
I have been trying to mod SRMs such that they do a lot more damage but don't have a larger explosion radius.

I have been so far unable to do so.

I have tried reducing the explosion distance in the rockets.xml but haven't gotten any results and haven't found anywhere else that might have explosion size in it.

Goblin Wizard 12-04-2010 07:37 PM

If you've found explosion_distance modifier you can see damage modifier right next to it. So what's the problem?

Two things:
1. If you want to be sure if something works or not you have to buy one from the shop right after you modified it. Modules in your inventory keep stats from the moment when you got them.
2. Visual explosion has nothing to do with real damage radius that you want to modify.

Goumindong 12-04-2010 07:52 PM

So i think that I know what explosion distance does.

What it does is it modifies the distance to the target that the missile will explode at. I think.

The problem with modifying damage is that as you increase the damage, the radius of damage increases.

So you can modify missile damage, but when you do so you get missiles that blow up entire wings. This is another reason why the hard missile hit clicky is so strong.

I am now fairly sure that the explosion size is hard coded by explosion damage.

Which means that it is not possible to do what I want.

Edit except with MIRVs

Goblin Wizard 12-04-2010 08:33 PM

Sorry, I didn't understand what you've done so far. You may be right. Try to ask Trucidation. He's made missile mod so he surely knows more about it.

One suggestion - you can try to change DistanceDetonator type to ImpactDetonator. I doubt it uses other algorithm but I think it's worth to try.

Goumindong 12-04-2010 08:52 PM

Quote:

Originally Posted by Goblin Wizard (Post 202478)
Sorry, I didn't understand what you've done so far. You may be right. Try to ask Trucidation. He's made missile mod so he surely knows more about it.

One suggestion - you can try to change DistanceDetonator type to ImpactDetonator. I doubt it uses other algorithm but I think it's worth to try.

Where is the switch? I only see distance detonators and MIRV detonators in rockets.xml

Rockets seem to be defined by their detonator type, carcass and seeker type. But i don't see anything other than MIRV and distance detonators

Edit: and then MIRV releases normal missiles defined in the same way

Goblin Wizard 12-04-2010 09:04 PM

Quote:

Originally Posted by Goumindong (Post 202480)
Where is the switch? I only see distance detonators and MIRV detonators in rockets.xml

Rockets seem to be defined by their detonator type, carcass and seeker type. But i don't see anything other than MIRV and distance detonators

ImpactDetonator is an unused type of detonator but it exists. Check the ..\Data\XMLSchema\AllModules.xsd. If you change the detonator type and remove explosion_distance line it should work.

Goumindong 12-04-2010 11:36 PM

I will give it a go. Let you know how it works out

Goumindong 12-05-2010 12:46 AM

Quote:

Originally Posted by Goumindong (Post 202494)
I will give it a go. Let you know how it works out

So i gave it a go.

I think but am not sure whether or not it reduced the radius. I don't think it did.

However it did make missiles explode when engaged by active ABM. Which is both hilarious and terrible

Goumindong 12-05-2010 02:17 PM

Update:

So i went and edited this in the AI.ini file

splashDamageMaxRadius = 30;50;20

to this

splashDamageMaxRadius = 30;50;1

And that did not work

So I changed it to

splashDamageMaxRadius = 1;50;20

And that worked. But it changed the explosion distance for ALL missiles to be so small that some missiles with high distance detonation numbers would not hit the enemy (launched a tier 2 torp at a group of traders and it did zero damage despite exploding on schedule)

I do not know what the second and third entries do. They may be parameters which say how quickly damage drops off or what not. But I am not sure

So it looks like you can do what I want(which is make SRMs valuable and dangerous to enemies rather than just you since you have to deal with so many of them). But if you do you are going to have to gimp torpedo's. Since you're going to have to reduce the size of explosions.

Rastix 12-05-2010 04:24 PM

splashDamageMaxRadius = 1;50;20

is equivalent to

splashDamageMaxRadius = 1

; is equivalent to rem

:)

Trucidation 12-05-2010 11:08 PM

Sorry guys, was out this weekend, missed this thread.

@Guomindong: you don't want to edit AI.ini because those are global parameters. Well, unless you want to make global changes :) You were correct, explosion radius for each missile is inside Rockets.xml. However, you must look at the detonator's radius instead of the one for the missile. Each missile has a definition and a detonation, that's how they work. For easy stuff like damage and radius you just edit the detonation. You can refer to this post here or the other posts in that thread.

I was working on some "bowling ball" missiles which bump a ship far away instead of inflicting much damage, but it got funny and weird when you kick capital ships away lol.

Goumindong 12-06-2010 01:50 AM

Quote:

Originally Posted by Trucidation (Post 202645)
Sorry guys, was out this weekend, missed this thread.

@Guomindong: you don't want to edit AI.ini because those are global parameters. Well, unless you want to make global changes :) You were correct, explosion radius for each missile is inside Rockets.xml. However, you must look at the detonator's radius instead of the one for the missile. Each missile has a definition and a detonation, that's how they work. For easy stuff like damage and radius you just edit the detonation. You can refer to this post here or the other posts in that thread.

I was working on some "bowling ball" missiles which bump a ship far away instead of inflicting much damage, but it got funny and weird when you kick capital ships away lol.

Yea, that doesn't work. The parameter you are referencing for each missile is NOT explosion radius. The parameter you are referencing is the distance from the target that the missile will detonate.

E.G. The explosion_distance on LRM's is between 1.5 and 5. The explosion distance on a MIRV cluster is 20. Yes, this parameter is on the detonator

MIRV clusters do not deal damage in a radius >10 times larger than LRMs. Rather they explode >10 times further away from their target to release their payload.

This is how rockets work

From Modules:

This describes where it pulls descriptions, how the module fits into the module slots, cost, acceptable range of fire, angle of fire, etc

Code:

<HomingRocket name="LRM2">
                <short_name>#M_Name_LRM2</short_name>
                <hint>#M_Hint_LRM2</hint>
                <short_desc>#M_SDesc_LRM2</short_desc>
                <long_desc>#M_LDesc_LRM2</long_desc>
                <mesh_name>Rl_lrm2</mesh_name>
                <flat_image>missile_LRM2</flat_image>
                <hit_points>10000</hit_points>
                <mass>5</mass>
                <disable_trade/>
                <cost>350</cost>
                <technology/>
                <attach_type/>
                <recharge_time>6</recharge_time>
                <viewing_angle>20</viewing_angle>
                <dispersion>1</dispersion>
                <min_distance>20</min_distance>
                <max_distance>450</max_distance>
                <max_rocket_count>2</max_rocket_count>
                <seeking_time>3</seeking_time>
                <RocketParams>
                        <rocket_name>LRM2_M</rocket_name>
                        <seeker_name>Seeker_B</seeker_name>
                        <detonator_name>ALR_det</detonator_name>
                </RocketParams>

The three last refer to things in the rockets.xml. Each one has a different function. Caracas defines the creation of the missile itself, seeker the quality of its seeking, and detonator the type of explosion.

From Rockets

Code:

        <RocketCarcass name="LRM2_M">
                <short_name>#M_Name_LRM2</short_name>
                <hint>#M_Hint_LRM2</hint>
                <short_desc/>
                <long_desc>#M_Hint_LRM2</long_desc>
                <mesh_name>small_rocket</mesh_name>
                <flat_image/>
                <hit_points>10</hit_points>
                <mass>50</mass>
                <disable_trade/>
                <cost/>
                <technology/>
                <EPR>0.05</EPR>
                <explosion_script>rocket_explosion</explosion_script>
                <work_sound/>
                <silence/>
                <max_speed>35</max_speed>
                <steering_power>0.3</steering_power>
        </RocketCarcass>

This above is the carcass, it includes speed, steering power, hit points(in case it is caught in an explosion) and mass


And

Code:

        <DistanceDetonator name="ALR_det">
                <time_to_live>35</time_to_live>
                <damage>200</damage>
                <explosion_distance>1.5</explosion_distance>
        </DistanceDetonator>

This is the explosion itself. It contains damage, how long the rocket will go before it explodes (I.E. real range) and the distance to the target that it will explode at.

Explosion distance is NOT the size of the explosion. Testing this is easier. Set that value to 20, watch as no missile you launch does any damage. Now change it back to 1.5 and then change damage to 2000. Watch as any missile you launch destroys multiple wings.

The size of the explosion is entirely determined by the damage of the explosion.

This is why you can modify SRMs to be MIRVs. Because each individual missile would do a small amount of damage and so the entire explosion would not be large.

Otherwise, if you say, increase the damage of all SRMs by a factor of 3, you will get missiles that do huge amounts of damage with huge AoE. This is what i was trying to avoid. The AoE.

and

Code:

        <HomingSeeker name="Seeker_B">
                <accuracy>3</accuracy>
                <anti_jammer>20</anti_jammer>
        </HomingSeeker>

Which defines how accurate your homing is and how resistant to anti-missile systems.

In general you can mix and match any of these to create a missile you want. You can also change the detonator type to ImpactDetonator but that is not recommended (it works just fine) since that makes missiles that are shot down explode on their own.

This is both very strong (enemies that shoot missiles at you when you have active Anti-Missile up generally tend to explode very fast) but very bad. Enemies that are close to you and shoot missiles will have the anti-missile blow you both up.


Such, if you want to modify the radius of damage from the explosion you have to do it through AI.ini or some other method which I have not encountered yet.

The only question is what the other two parameters at the end of the tack in ai.ini do. Rastix says they do nothing. Looking over ai.ini again i tend to believe him (since i see text after semi-colons)

Trucidation 12-06-2010 06:38 AM

Hmm, didn't do enough testing to notice - sorry guys, looks like I need to update the info there. It worked for my mod since I lowered warhead damage a lot (and hence low aoe). The jamming isn't a problem because we can see how it works in another script.

Well unless Rastix has another way to let you decouple the aoe from the damage then I have no idea. Don't really feel like reinstalling to test either, there are too many hidden limitations in the game. Maybe when Ashes of Victory comes out.

Goumindong 12-07-2010 02:49 PM

The fact that you lowered the explosion distances is also likely why you see rockets doing more "pushing". Warheads that explode close to a target are more likely to actually collide with the target before exploding (there is some amount of delay before they actually pop). And if they collide with the target then they will transfer momentum just like anything else.

Goblin Wizard 12-07-2010 08:04 PM

If you want some fun with missiles try modding alien poison missile (poison detonator). Only this missile uses special editable poisoning script. It's a common script file so you put in it any effect you want. For example you can add real blast wave with Push/Move function, effect which strips enemies of shields, disable their engines, spawn some friendly mercenaries on their backs. You can make a nasty "Marked for Death" perk and deliver it to anyone caught in the explosion radius.:mrgreen: Possibilities are countless.:cool:

Goumindong 12-07-2010 11:32 PM

Quote:

Originally Posted by Goblin Wizard (Post 203062)
If you want some fun with missiles try modding alien poison missile (poison detonator). Only this missile uses special editable poisoning script. It's a common script file so you put in it any effect you want. For example you can add real blast wave with Push/Move function, effect which strips enemies of shields, disable their engines, spawn some friendly mercenaries on their backs. You can make a nasty "Marked for Death" perk and deliver it to anyone caught in the explosion radius.:mrgreen: Possibilities are countless.:cool:


that could fix my problem. But I can't seem to find these properties you're discussing in the shippoisoning script. It seems like all that does is tell the game whether or not a ship can be poisoned and the rest is hard coded in the poisondetonator just like anything else.

I mean, I suppose i could make a poisondetonator which did a lot of damage for like 1 second in a very small radius. But then missiles would penetrate shields and you couldn't shoot them at aliens.

edit: XML schema seems to indicate that the poisondetonator is just as hardwired as the rest.

What would be interesting is if i could create a sub extension off of poisondetonator or distance detonator in order to do what I want. Or if i could add another parameter to the schema of impactdetonator and have the game actually use it.

Trucidation 12-07-2010 11:35 PM

Quote:

Originally Posted by Goumindong (Post 203007)
The fact that you lowered the explosion distances is also likely why you see rockets doing more "pushing". Warheads that explode close to a target are more likely to actually collide with the target before exploding (there is some amount of delay before they actually pop). And if they collide with the target then they will transfer momentum just like anything else.

I deliberately cloned the low default mass for MIRV warheads for my missiles, which is why there is no untoward momentum transfer in my mod.

Goblin Wizard 12-08-2010 06:31 AM

Quote:

Originally Posted by Goumindong (Post 203093)
thatWhat would be interesting is if i could create a sub extension off of poisondetonator or distance detonator in order to do what I want. Or if i could add another parameter to the schema of impactdetonator and have the game actually use it.

You can't. All detonators' parameters are hardcoded. I've never found out what the xml schema is really for.

Below you have an example how the ShipPoisoning script may look.
Code:

function ShipCanBePoisoned(ship)
        pilot = ship:GetPilot();
 
  if not (GetCurrentLocation() == "x220") or not (GetCurrentLocation() == "Precursors") or not (GetCurrentLocation() == "DisonSphere") then
    if (pilot == nil) then
                  return FALSE;
          else
      if (GetQuestLabel("warhead_type") == "depol") then
        ship:SetShield(0);
        ship:PlayFX("Depol.bfx");
        return FALSE;
      elseif (GetQuestLabel("warhead_type") == "blast") then
        return FALSE;
      else
        return TRUE;
      end;
    end;
  else
          if (pilot == nil) then
                  return FALSE;
          else
                  if (pilot:HavePerk("Alien")) then
              return FALSE;
                  else
              return TRUE;
                  end;
          end;
  end;
end;

--function ShipCanBePoisoned(ship)
--        pilot = ship:GetPilot();
----  flight = pilot:GetFlight();
-- 
--  if not (GetCurrentLocation() == "x220") or not (GetCurrentLocation() == "Precursors") or not (GetCurrentLocation() == "DisonSphere") then
--    if (pilot == nil) then
--                  return FALSE;
--          else
----          (GetQuestLabel("warhead_type") == blast) then
--      ship:SetShield(0);
----      flight:Stop();
----      ship:ApplyImpulse(100, Vector3(0, 1, 0));
----      myfunction();
--      return FALSE;
----    else
----      return FALSE;
--    end;
--  else
--          if (pilot == nil) then
--                  return FALSE;
--          else
--                  if (pilot:HavePerk("Alien")) then
--              return FALSE;
--                  else
--              return TRUE;
--                  end;
--          end;
--  end;
--end;

It's just an example what I've been working on (it's far from what I've expected). GetQuestLabel thing was conncted with special "swich" skill . Every use of that skill changes the missile "warhead" type so without changing missile type you can change the way it works.

The main problem is that this script is connected with every poison detonator you make. It's hard to find good ifs to make it works differently for each type of missile. To make it work like normal missile you have to set poisoning effect damage to 0 and time to something like 1s or even 0.1s.

Goumindong 12-09-2010 01:08 AM

Yea, I am trying to think of what info we can pull off the ship or from a global area that would help us but I am failing pretty hard at it.

Goblin Wizard 12-09-2010 06:26 AM

I don't know exactly what you want to do but you can check through the scripts how the phrase "ship:" is used. You'll have an idea about functions working directly with ship like "ship:GetPilot()". Check this Manual too.


All times are GMT. The time now is 03:02 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.