Arcen Games

General Category => Starward Rogue => Starward Rogue Mods & Modding => : TheDauthi June 16, 2016, 01:32:34 PM

: Adding Second Drone to Blue
: TheDauthi June 16, 2016, 01:32:34 PM
Okay, so I was playing with this, but it doesn't work and I can't figure out just why.  It seems really simple, but I've tried 12 variations (according to git).  It really just has to be something stupid.

Trying to do: add a second drone of the same type as he starts with to the blue mech as a level up perk.

First version looked like this:
:
   <entity name="SecondaryDrone" category="ItemPickup" image_folder="Perks"
        display_name="Secondary Drone" description="Gives you a second beam drone"
        should_be_remembered_as_power_up="true" auto_pickup="true"
        >
       <modifier target="OnPickupGrantToPlayer" type="NoInherentBehavior">
          <effect type="AddSystem" targeting="Player" timing="OnModifierAdded" related_systems="DeepBlue_Familiar" />
        </modifier>
    <hitbox radius ="32" />
  </entity>

Can someone explain what doesn't work as expected here?
: Re: Adding Second Drone to Blue
: Pepisolo June 16, 2016, 01:47:33 PM
Huh, that's weird. I just tried this in a test room.....and it works! Not sure why it isn't working for you. Curious. How are you testing it, via perk select or in the test room? Are you making sure to walk where the pickup is, so that you collect it?
: Re: Adding Second Drone to Blue
: TheDauthi June 16, 2016, 02:15:14 PM
I've been doing it via perk select.  Changing the XP required for Level 2 to 1 and adding the perk to blue's L2 perk list added the perk itself, and I verified it was working by adding a different system (a weapon system, if I recall).  I'll build a test room next time.

However, it works now.  And it definitely didn't last night.  I tried adding different familiars, too, (since I assumed they might spawn atop one another and have the same leash, making it hard to see), and that never worked, either.  Adding other systems (like a weapon) this way worked fine.  At this point, I had been assuming that it didn't spawn the familiar automatically.

I've been relying on ctrl-F4 for XML reload, does that act any differently than an actual game restart?
: Re: Adding Second Drone to Blue
: Pepisolo June 16, 2016, 02:25:21 PM
I'm really not sure about whether CTRL+F4 acts differently to a full restart, Keith would need to answer that one. However, on occasion sometimes I would get some messages that didn't seem to make sense upon refreshing whereas a full restart seemed to do the trick, so maybe sometimes it doesn't refresh correctly, but I could be wrong. If something isn't working right, go for the full restart, just in case. That's what I do anyway! I'm glad you got it working in the end.
: Re: Adding Second Drone to Blue
: ptarth June 16, 2016, 03:07:00 PM
Adding or removing xml entities is not properly updated when reloading your xml. You need to do a full restart in those cases. If you have an existing xml entry, that will update, most of the time.
: Re: Adding Second Drone to Blue
: TheDauthi June 16, 2016, 04:32:49 PM
Adding or removing xml entities is not properly updated when reloading your xml. You need to do a full restart in those cases. If you have an existing xml entry, that will update, most of the time.

That may have been it.  I thought I did a full restart to try it too, but if it works today, and didn't last night, I suspect I didn't.  I've been using ctrl-F4 a lot, because the game starts really slowly for some reason on my machine.  Good knowledge to have - if something doesn't work, try the full restart.  Thanks.
: Re: Adding Second Drone to Blue
: Draco18s June 16, 2016, 11:53:51 PM
Turn down the texture quality, things'll load up much faster.