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

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
XML questions and answers
« on: January 11, 2016, 06:13:19 pm »
Repurposing this thread to be more useful as a Q&A XML thread.

My original Questions (and answers).



Back before Christmas I wrote out some rooms and enemies, which were slightly flawed at the time.

Flaws Included
  • Need different room sizes
    • Room sizes are hard coded. The ones available in the editor are the only ones available.

  • Need different ship movement patterns
    • Shot movements have an extensive underlying system. Ship movements are more limited right now, although an update post .80X is coming to add more options.

  • Ship placement in the editor used to enforce a floor as the tile under the ship. Has this changed?
    • I think so.

  • Is xml documentation up to date [.802]?
    • We think so.

« Last Edit: January 25, 2016, 05:31:10 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 ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: Update on [.80X] xml changes?
« Reply #1 on: January 11, 2016, 10:07:30 pm »
And while I'm at it, I'll do some complaining off topic, having the Room definitions not be in the Configuration folder drives me nuts.
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 Pepisolo

  • Arcen Volunteer
  • Master Member Mark II
  • *****
  • Posts: 1,511
Re: Update on [.80X] xml changes?
« Reply #2 on: January 11, 2016, 10:19:22 pm »
Back before Christmas I wrote out some rooms and enemies, which were slightly flawed at the time.

Flaws Included
  • Need different room sizes
  • Need different movement patterns
  • ability to change tile under enemy spawn

Is the xml documentation on the wiki up to date? I'd like to see if I could fix some of the issues I was having before shipping it off to Chris to reduce Arcen workload. Cheers.

The wiki is up to date, I'm pretty sure. Regarding room sizes, I haven't done a lot in this area, but you can't choose your own room size, I don't think, but you can choose from the variety of room sizes already available in the editor. As for movement patterns, do you mean enemy or shot movement patterns? You can do all kinds of crazy movements for shots, not so much for enemies (although one big improvement in this area is due). Not sure about your last, issue.

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: [.80X] xml questions and answers
« Reply #3 on: January 11, 2016, 11:18:21 pm »
Q: I'm trying to create an enemy ship that has to slow down to change corners in nonmomentum mode, a psuedo-inertia style effect. Right now acceleration allows for the increase of current speed up to maximum speed, but then the enemy ship never slows down. That's not quite the effect I was looking for. Ideas?
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 #4 on: January 12, 2016, 01:18:00 am »
Q: The wiki example of a ship: https://www.arcengames.com/mediawiki/index.php?title=Starward_Rogue:XML_-_GameEntity_Definitions contains turning_resistance="2.25" has this been deprecated?
A: Yes.
« Last Edit: January 12, 2016, 03:36:19 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 Pepisolo

  • Arcen Volunteer
  • Master Member Mark II
  • *****
  • Posts: 1,511
Re: [.80X] xml questions and answers
« Reply #5 on: January 12, 2016, 04:23:02 am »
Q: The wiki example of a ship: https://www.arcengames.com/mediawiki/index.php?title=Starward_Rogue:XML_-_GameEntity_Definitions contains turning_resistance="2.25" has this been deprecated?

I'm not 100% sure. There's all kind of things in the engine, I think that may be left over from TLF. Turning resistance is not currently used, though, as far as I'm aware. Probably deprecated, but Chris or Keith should be able to give you a more authoritative answer.

Offline Misery

  • Arcen Volunteer
  • Core Member Mark V
  • *****
  • Posts: 4,109
Re: [.80X] xml questions and answers
« Reply #6 on: January 12, 2016, 06:28:29 am »
Yep, there's a bunch of stuff that's left over from TLF.  Some things were changed to fit this game, but some were not and remain basically useless.

As enemies go, I've never seen one be affected by momentum and such.  I dont know that their AI in this game supports that anyway.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: [.80X] xml questions and answers
« Reply #7 on: January 12, 2016, 12:10:39 pm »
I think turning_resistance was deprecated after that wiki article was started, yea. We do need to clean that up

The best source of examples right now is probably just the existing enemies in the game files, etc.
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 #8 on: January 14, 2016, 07:04:46 pm »
Q: How does the PeriodicMovementMode coding work? I've tried several things, but it can't get it to do anything. No current enemies use it, so it might be nonfunctional at this juncture.
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 Pepisolo

  • Arcen Volunteer
  • Master Member Mark II
  • *****
  • Posts: 1,511
Re: [.80X] xml questions and answers
« Reply #9 on: January 14, 2016, 09:34:50 pm »
Q: How does the PeriodicMovementMode coding work? I've tried several things, but it can't get it to do anything. No current enemies use it, so it might be nonfunctional at this juncture.

Here's the example, somewhere in the wiki in the modifiers section.

<entity name="SmallEnemy"
   category="Ship"
   display_name="Small Test Enemy"
   behavior="Attacker"
   speed="100"
   max_health="100"
>
   <system type="TestWeapon" offset="20,10" />
   <hitbox radius="32" />
   <periodic_movement_mode type="Reposition" related_point="10,5">
      <modifier type="MovementSpeed" math="Set" magnitude="1000" />
   </periodic_movement_mode>
</entity>

You also need to set a periodic_movement_mode_interval_min and periodic_movement_mode_interval_max. Last I checked it seemed to sort of work, although there aren't many behaviours currently.

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: [.80X] xml questions and answers
« Reply #10 on: January 15, 2016, 03:27:12 pm »
Mostly got it working based upon Pepisolo's entry.

First, updated "fully" functional code:

<entity name="bob" category="Ship" ship_category="Wander_3x3"
   display_name="Small Test Enemy"
   behavior="Attacker"
   speed="100"
   max_health="100"
      periodic_movement_mode_interval_min="0"
   periodic_movement_mode_interval_max="5"
             image_folder="Familiars"
        image_name="Ram"
>
   <hitbox radius="32" />
   <periodic_movement_mode type="Reposition" related_point="10,10">
      <modifier type="MovementSpeed" math="Set" magnitude="1000" />
   </periodic_movement_mode>
</entity>


However, one Reposition has started, it cannot end and generates a fatal error.

FixedUpdate: System.NullReferenceException: Object reference not set to an instance of an object
  at GameEntity.ClearPeriodicMovementMode () [0x00000] in <filename unknown>:0
  at Flock.ReevaluateAIOrders () [0x00000] in <filename unknown>:0
  at CombatEncounter.<DoCombatStep>b__16 (.Flock flock) [0x00000] in <filename unknown>:0
  at CombatSide.DoForFlocks (.ProcessorDelegate Processor) [0x00000] in <filename unknown>:0
  at CombatSide+<>c__DisplayClass4.<DoForFlocksThatAreHostileToMe>b__3 (.CombatSide side) [0x00000] in <filename unknown>:0
  at CombatEncounter.DoForSides (.ProcessorDelegate Processor) [0x00000] in <filename unknown>:0
  at CombatSide.DoForFlocksThatAreHostileToMe (.ProcessorDelegate Processor) [0x00000] in <filename unknown>:0
  at CombatEncounter.DoCombatStep (Single EffectiveDeltaTime) [0x00000] in <filename unknown>:0
  at World.DoWorldStepLogic (Single effectiveDeltaTime, Boolean IsFirstLoop) [0x00000] in <filename unknown>:0
  at World.ProcessSimStepOnPrimaryMachineOnly (Int32 SimLoopNumber) [0x00000] in <filename unknown>:0
  at Game.ProcessSimStep () [0x00000] in <filename unknown>:0
  at ArcenMainCameraImplementations.MainUpdateLogic () [0x00000] in <filename unknown>:0
Stack Trace:   at GameEntity.ClearPeriodicMovementMode () [0x00000] in <filename unknown>:0
  at Flock.ReevaluateAIOrders () [0x00000] in <filename unknown>:0
  at CombatEncounter.<DoCombatStep>b__16 (.Flock flock) [0x00000] in <filename unknown>:0
  at CombatSide.DoForFlocks (.ProcessorDelegate Processor) [0x00000] in <filename unknown>:0
  at CombatSide+<>c__DisplayClass4.<DoForFlocksThatAreHostileToMe>b__3 (.CombatSide side) [0x00000] in <filename unknown>:0
  at CombatEncounter.DoForSides (.ProcessorDelegate Processor) [0x00000] in <filename unknown>:0
  at CombatSide.DoForFlocksThatAreHostileToMe (.ProcessorDelegate Processor) [0x00000] in <filename unknown>:0
  at CombatEncounter.DoCombatStep (Single EffectiveDeltaTime) [0x00000] in <filename unknown>:0
  at World.DoWorldStepLogic (Single effectiveDeltaTime, Boolean IsFirstLoop) [0x00000] in <filename unknown>:0
  at World.ProcessSimStepOnPrimaryMachineOnly (Int32 SimLoopNumber) [0x00000] in <filename unknown>:0
  at Game.ProcessSimStep () [0x00000] in <filename unknown>:0
  at ArcenMainCameraImplementations.MainUpdateLogic () [0x00000] in <filename unknown>:0


   at System.Environment.get_StackTrace()
   at ArcenDebugging.ArcenDebugLog(System.String Message, DebugLogDestination Destination, Boolean IncludeStackTrace, Verbosity Verbosity)
   at ArcenDebugging.ArcenDebugLog(System.String Message, DebugLogDestination Destination, Verbosity Verbosity)
   at ArcenDebugging.ArcenDebugLog(System.String Message, Verbosity Verbosity)
   at EngineConfig.WriteToErrorFile(System.String ErrorFile, System.String ErrorName, System.String ErrorText, Boolean SuppressArcenDebugLog)
   at EngineConfig.WriteToErrorFile(System.String ErrorFile, System.String ErrorName, System.String ErrorText)
   at MainCameraLogic.LogWritten(System.String LogString, System.String StackTrace, LogType Type, System.Exception Cause, Boolean CameFromUnity)
   at MainCameraLogic.LogWritten(System.String LogString, System.String StackTrace, LogType Type, System.Exception Cause)
   at ArcenMainCameraImplementations.Log(System.String LogString, System.String StackTrace, LogType Type, System.Exception Cause)
   at ArcenMainCameraImplementations.MainUpdateLogic()
   at MainCameraLogic.Update()


I'm not sure if it affects only Reposition or all other Periodic Movement types. As it stands it is unuseable.
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 #11 on: January 15, 2016, 03:28:29 pm »
Thanks for the stack trace; I've fixed the bug in my working copy.
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 #12 on: January 15, 2016, 03:41:56 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.
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 #13 on: January 15, 2016, 03:44:11 pm »
We all have our failings, sadly.
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 #14 on: January 15, 2016, 05:18:56 pm »
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>
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.