Arcen Games

General Category => Starward Rogue => Starward Rogue Mods & Modding => : carldong January 10, 2017, 06:16:23 PM

: Mech begin with modules attached?
: carldong 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!).
: Re: Mech begin with modules attached?
: carldong 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.
: Re: Mech begin with modules attached?
: Logorouge 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.
: Re: Mech begin with modules attached?
: carldong 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.
: Re: Mech begin with modules attached?
: Logorouge 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
: Re: Mech begin with modules attached?
: carldong 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.
: Re: Mech begin with modules attached?
: ptarth 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.
: Re: Mech begin with modules attached?
: carldong 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.
: Re: Mech begin with modules attached?
: ptarth January 11, 2017, 12:51:39 AM
Caltrops are Hazard
Melee damage is ballistic
Most bullets are also ballistic.
: Re: Mech begin with modules attached?
: carldong 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.
: Re: Mech begin with modules attached?
: carldong 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.
: Re: Mech begin with modules attached?
: ptarth January 11, 2017, 02:32:21 AM
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.
: Re: Mech begin with modules attached?
: carldong 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...
: Re: Mech begin with modules attached?
: ptarth 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.