Author Topic: Mech begin with modules attached?  (Read 14568 times)

Offline carldong

  • Full Member Mark III
  • ***
  • Posts: 216
Mech begin with modules attached?
« on: January 10, 2017, 06:16:23 pm »
So I tried some modding. I would like to know how I can add a certain module (or other things) attached to a mech when starting? Either a normal module that can be removed, or some Incredible(The Creator. Yes!).

Offline carldong

  • Full Member Mark III
  • ***
  • Posts: 216
Re: Mech begin with modules attached?
« Reply #1 on: January 10, 2017, 10:25:36 pm »
OK, I got this by adding a <system> line.

Now what about pickups? I am trying to add a mech that has BigLeakyBattery by default. How would I do that? Don't seem to find similar options yet, because it has no system.

Offline Logorouge

  • Hero Member
  • *****
  • Posts: 514
Re: Mech begin with modules attached?
« Reply #2 on: January 10, 2017, 10:30:10 pm »
OK, I got this by adding a <system> line.

Now what about pickups? I am trying to add a mech that has BigLeakyBattery by default. How would I do that? Don't seem to find similar options yet, because it has no system.
I think you could add the modifier instead. Just change the target to "self" and it should work, in theory.

Offline carldong

  • Full Member Mark III
  • ***
  • Posts: 216
Re: Mech begin with modules attached?
« Reply #3 on: January 10, 2017, 10:33:06 pm »
OK, I got this by adding a <system> line.

Now what about pickups? I am trying to add a mech that has BigLeakyBattery by default. How would I do that? Don't seem to find similar options yet, because it has no system.
I think you could add the modifier instead. Just change the target to "self" and it should work, in theory.

I want the player to see the battery image... So that they are nervous.

Offline Logorouge

  • Hero Member
  • *****
  • Posts: 514
Re: Mech begin with modules attached?
« Reply #4 on: January 10, 2017, 10:44:36 pm »
I want the player to see the battery image... So that they are nervous.
Hm, that I don't know how to add though. Even Deep Blue doesn't start with a power up icon, so I just assumed it wasn't meant to be. :P

Offline carldong

  • Full Member Mark III
  • ***
  • Posts: 216
Re: Mech begin with modules attached?
« Reply #5 on: January 10, 2017, 11:12:46 pm »
Yeah, the effect is there, but the icon is not... Not sure if it is possible in XML.

Then, the Contrishooter doesn't display energy correctly too, so just filed a bug report.

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: Mech begin with modules attached?
« Reply #6 on: January 10, 2017, 11:27:37 pm »
To get the icon to show up, I believe you have to use an entity.

I think you can:
Make an entity with the should_be_remembered_as_power_up ="true" and auto_pickup="true". (See Perks for examples)
Add a system to the hull that uses spawn_entity to spawn the entity, destruct the system after use.

It is a kludge, but it gets what you want.

Contrishooter doesn't use energy, it uses credits. So the display is caught between energy & credits.
Note: This post contains content that is meant to be whimsical. Any belittlement or trivialization of complex issues is only intended to lighten the mood and does not reflect upon the merit of those positions.

Offline carldong

  • Full Member Mark III
  • ***
  • Posts: 216
Re: Mech begin with modules attached?
« Reply #7 on: January 10, 2017, 11:41:28 pm »
Got it. Then I am not modding the Contrishooter for now...

Now, what is the damage type of traps? Or Contact with enemies? Energy Shield module doesn't prevent those things, so making my 1-hit-point-wonder is... triky.

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: Mech begin with modules attached?
« Reply #8 on: January 11, 2017, 12:51:39 am »
Caltrops are Hazard
Melee damage is ballistic
Most bullets are also ballistic.
Note: This post contains content that is meant to be whimsical. Any belittlement or trivialization of complex issues is only intended to lighten the mood and does not reflect upon the merit of those positions.

Offline carldong

  • Full Member Mark III
  • ***
  • Posts: 216
Re: Mech begin with modules attached?
« Reply #9 on: January 11, 2017, 01:01:39 am »
Caltrops are Hazard
Melee damage is ballistic
Most bullets are also ballistic.

Found it. However, energy isn't immune to melee but is immune to bullets... Also it doesn't seem to be immune to boomerang, but I am not sure for this one.

Offline carldong

  • Full Member Mark III
  • ***
  • Posts: 216
Re: Mech begin with modules attached?
« Reply #10 on: January 11, 2017, 01:05:49 am »
Can I spawn an entity directly somehow? This way, I can use auto_pick attribute to get it.

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: Mech begin with modules attached?
« Reply #11 on: January 11, 2017, 02:32:21 am »
Quote
Found it. However, energy isn't immune to melee but is immune to bullets... Also it doesn't seem to be immune to boomerang, but I am not sure for this one.

Not sure what you are saying here.


 
Can I spawn an entity directly somehow? This way, I can use auto_pick attribute to get it.

I'm not sure what you mean by directly. There has to be something to launch the spawn code from. You can add it in an external script and such, but that requires turning on the dev tools for that run. You could add it to the floor, but you'd then have it present with all mechs. Alternatively you can put it as the perk for level 1 and just give the mech enough experience to start at  level 1. Effectively make a "choose your class" perk for level 1.
Note: This post contains content that is meant to be whimsical. Any belittlement or trivialization of complex issues is only intended to lighten the mood and does not reflect upon the merit of those positions.

Offline carldong

  • Full Member Mark III
  • ***
  • Posts: 216
Re: Mech begin with modules attached?
« Reply #12 on: January 11, 2017, 11:37:05 am »
Quote

    Found it. However, energy isn't immune to melee but is immune to bullets... Also it doesn't seem to be immune to boomerang, but I am not sure for this one.


Not sure what you are saying here.

The Energy Shield Module doesn't block contact damage, despite being Ballistic, even when I have full energy. Boomerangs seems to be blocked when I tried again. I must have bumped into some enemies.

Quote from: carldong  on Today at 01:05:49 AM

    Can I spawn an entity directly somehow? This way, I can use auto_pick attribute to get it.


I'm not sure what you mean by directly. There has to be something to launch the spawn code from. You can add it in an external script and such, but that requires turning on the dev tools for that run. You could add it to the floor, but you'd then have it present with all mechs. Alternatively you can put it as the perk for level 1 and just give the mech enough experience to start at  level 1. Effectively make a "choose your class" perk for level 1.

Then nevermind, I just modded the mech with those modifiers on.

And two Deep Blue drones overlay each other.... Looks a bit strange. I will need to check code for that too...

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: Mech begin with modules attached?
« Reply #13 on: January 11, 2017, 04:14:15 pm »
Melee damage may either be occurring in a different damage check or it may not be setting on all entities correctly. I'm not sure.
Note: This post contains content that is meant to be whimsical. Any belittlement or trivialization of complex issues is only intended to lighten the mood and does not reflect upon the merit of those positions.