Author Topic: XML questions and answers  (Read 68558 times)

Offline Misery

  • Arcen Volunteer
  • Core Member Mark V
  • *****
  • Posts: 4,109
Re: [.80X] xml questions and answers
« Reply #15 on: January 15, 2016, 05:22:04 pm »
And it happens with ShadowDash....
...And Keith fixed it before I could complete my bug testing in a systematic way.

Arg. You guys keep doing this wrong. This is how this is supposed to work.

  • I spend 2 hours testing each of the PeriodicMovement modes.
  • I spend 15 minutes to write up the error and submit it to mantis.
  • It sits on mantis for a few weeks to months.
  • You reject the bug on the grounds of nonreproducibility.
  • I repeat the first 4 steps.
  • You announce you are switching to a new engine.
  • I repeat the first 4 steps again.
  • You fix it.

Disregarding the process is very nontraditional.


You forgot step 9:   Break something else during the fix.  Sometimes 2 things.


And the blasted "modify" button needs to be located.... anywhere other than where it is.   

Q: Why can't I use a loop within a BulletPattern?
A: Loop is defined to work within a Bullet, so you have to create a bullet first, then you can have a loop and within it a Bullet pattern.

This would work:
   <bullet_pattern name="ExamplePattern">
     <bullet angle="0" speed="0">
      <loop iterations="5">
      <spawn>
                <bullet_pattern>
      $FlagShot SPEED=260 ANGLE=0 SHOT=WingsRed
      </bullet_pattern>
      </spawn>
      </loop>
      </bullet>
   </bullet_pattern>
   

This does not work:
   <bullet_pattern name="ExamplePatternNotWork">
      <loop iterations="5">
      $FlagShot SPEED=260 ANGLE=0 SHOT=WingsRed
      </loop>
   </bullet_pattern>

This bit always confused me too.  Looping outside of the bullets would help in some situations.  Like with the Battleswarm bosses and it's 20 lines or so of the same thing because trying to stick it all into the var file confused me and broke a buncha things.  I love when that happens, that's my favorite part.  Usually it's a typo that does it.

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: [.80X] xml questions and answers
« Reply #16 on: January 15, 2016, 05:45:38 pm »
I just spent longer than I care to think about because this:
                ...
      <wait time="0.03" />
      </bullet_pattern>
      </spawn>

crashes, but this
                ...
      </bullet_pattern>
      </spawn>
      <wait time="0.03" />

works just fine.
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 keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: [.80X] xml questions and answers
« Reply #17 on: January 15, 2016, 05:54:23 pm »
Our parser just ignores anything it doesn't understand.

The XML parser that actually reads in the file takes a very different view.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: [.80X] xml questions and answers
« Reply #18 on: January 15, 2016, 05:59:22 pm »
Can you declare a variable as a variable?
I.e., something like:
     SHOT1= WidowShotRed
followed by
     SHOT = "[SHOT1]"
in another <var>?
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 keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: [.80X] xml questions and answers
« Reply #19 on: January 15, 2016, 06:03:58 pm »
Can you declare a variable as a variable?
I.e., something like:
     SHOT1= WidowShotRed
followed by
     SHOT = "[SHOT1]"
in another <var>?
Give it a try ;)

Recursive templates are supported, though it's only going to try to resolve $(variable name) references; the [SHOT1] or whatever will just be kept verbatim in the search and replace process. So I don't know if it does what you want, off hand.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: [.80X] xml questions and answers
« Reply #20 on: January 15, 2016, 06:18:30 pm »
That's what I've been trying to get to work. I wasn't sure if it is my syntax or something else that is bugging out. The conflicting XML readers got me again for a good while earlier. When I have good code and then make a change that creates bad code and reload the xml, if it is bad in the right way, it doesn't load, but it also doesn't throw an error message. It just happily uses the preloaded code, which I happen to overlook/forget every single time...

So, I had to take a break from it. Which then lead me to the patch notes, which states:
The Very Easy and Easy difficulty levels slow down all enemy movement and shot patterns -- the patterns and whatnot stay coherent, as everything is slowed down as if time were moving in slow-motion (relative to the frantic pace of the higher difficulties, anyway; it's still plenty snappy).
This doesn't affect your own shots or movements at all. It simply gives you more time to react to enemies.
On normal mode, things are actually slowed down a bit compared to before, too. Not so much, just a bit.

This got me thinking about making a bullet time (a la The Matrix or any number of FPS games) energy system. Which lead me to reading the existing energy systems....

and now I'm back to trying to make a weapon system that shoots flags.
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 ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: [.80X] xml questions and answers
« Reply #21 on: January 15, 2016, 06:22:33 pm »
And then if I exit out and restart SR, then everything works just fine.
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 keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: [.80X] xml questions and answers
« Reply #22 on: January 15, 2016, 06:27:23 pm »
And then if I exit out and restart SR, then everything works just fine.
Standard Microsoft Engineering.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: [.80X] xml questions and answers
« Reply #23 on: January 15, 2016, 06:42:25 pm »
Working Example of how to redefine a variable as a variable:

BulletPatterns.xml
Code: [Select]
<bullet_pattern name="FlagUS2Pattern">
$FlagShot88 SPEED=260 ANGLE=0 SHOT1=WingsBlue SHOT2=WingsRed SPOSY=-50
</bullet_pattern>
Bullet_vars.xml
Code: [Select]
        <var name="FlagShot">
               <bullet angle="[ANGLE]" speed="[SPEED]" shot_type="[SHOT]" spawn_offset ="[SPOSX],[SPOSY]">
        </var>

<var name="FlagShot88">
$FlagShot SHOT=[SHOT1] SPOSX=0
$FlagShot SHOT=[SHOT2] SPOSX=10
        </var>
« Last Edit: January 15, 2016, 06:45:20 pm by ptarth »
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 Misery

  • Arcen Volunteer
  • Core Member Mark V
  • *****
  • Posts: 4,109
Re: [.80X] xml questions and answers
« Reply #24 on: January 15, 2016, 06:59:11 pm »
and now I'm back to trying to make a weapon system that shoots flags.

What, like.... shoots actual flags, like the kind that go on poles and wave around?  Or am I just being dense?

Sounds like something I'd come up with.  Hell, the original idea for Labryinth, and the reason it has that name, was because the plan was "it shoots an entire maze at you".  The logistics of that, though, were just a BIT of a headache (though it occurs to me it'd be MUCH easier now), and then I remembered the Obscura Disc, which ended that idea.  Dont need another failed mad science experiment trying to kill you.



I just spent longer than I care to think about because this:
                ...
      <wait time="0.03" />
      </bullet_pattern>
      </spawn>

crashes, but this
                ...
      </bullet_pattern>
      </spawn>
      <wait time="0.03" />

works just fine.


aaaaaaaarrrrgh


Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: [.80X] xml questions and answers
« Reply #25 on: January 15, 2016, 07:28:59 pm »

What, like.... shoots actual flags, like the kind that go on poles and wave around?  Or am I just being dense?


Nope. That's exactly what I mean.

Now I have to decide if it is too frivolous to submit and how to use it amusingly.
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 Misery

  • Arcen Volunteer
  • Core Member Mark V
  • *****
  • Posts: 4,109
Re: [.80X] xml questions and answers
« Reply #26 on: January 15, 2016, 07:33:48 pm »
I.... just.... what.  How in the....

It looks like there was probably.... math.... involved.  Alot of it. 

I'm just going to stick to making horrible spinning deathnados, I think.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: [.80X] xml questions and answers
« Reply #27 on: January 15, 2016, 07:35:05 pm »
I went to a SHMUP and a soccer game broke out.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: [.80X] xml questions and answers
« Reply #28 on: January 15, 2016, 07:51:06 pm »
There is no math involved and it is dwarfed by the stuff you've been writing. It really is relatively quite simple. Mind you, I haven't done any of the trickier flags besides the USA (because I'm a nationalist). I've attached all the files you need to generate a test room with the shot in use. The room is a QuadEE room, so you'll need to drop the room definition in there.
« Last Edit: January 15, 2016, 08:46:11 pm by ptarth »
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 Misery

  • Arcen Volunteer
  • Core Member Mark V
  • *****
  • Posts: 4,109
Re: [.80X] xml questions and answers
« Reply #29 on: January 15, 2016, 08:39:54 pm »
Is there a system file somewhere?  It complains about that.

Though just looking at the pattern/var files, I can see how this works.  Very, very interesting.

How you managed to think that up, I dont even know. I am impressed! Woulda just ended up as a pile of flaming space bees or something if I'd tried to do it.  Something like that is only dwarfed by something of mine because anything of mine is hideously inefficient.  I just jam things together in no particular order and hit them with a virtual wrench or something until they function in some fashion.

And looking around in those files.... Rocket Frog, really?

Clearly, the game requires this addition.

What other crazy stuff might you have?