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

Offline Ayrix

  • Newbie Mark III
  • *
  • Posts: 42
Re: XML questions and answers
« Reply #195 on: February 14, 2016, 02:32:27 pm »
Q: Does destroys_firing_entity count as a kill or not i.e. does it trigger on death effects?
Having fun trying to clear up my thing that endlessly respawns itself, needs to go *poof* without dying.

Yes. You can actually have enemies that propagate from having multiple destroys_firing_entity  and on_death effects. I found that out the hard way after my enemies started multiplying.
Did you have a play with my silly miniboss, which just spawns more and more enemies that revive if the boss isn't dead

https://www.arcengames.com/mantisbt/view.php?id=18646

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: XML questions and answers
« Reply #196 on: February 14, 2016, 05:42:57 pm »
I hadn't. I had known you were working on one, but wasn't sure you were interested in player feedback. I'll take a look now. I'll also start a thread, since I'm guessing it would be useful.
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: XML questions and answers
« Reply #197 on: February 15, 2016, 12:11:28 am »
Q: You have been making a ton of changes including writing up a new TestChamber. When you try to load the TestChamber you either get a fatal error or something like:
Code: [Select]
OnGUI: System.NullReferenceException: Object reference not set to an instance of an object
  at GameEntityTypeData.GetReplacementToUse (.MersenneTwister Random, Int32 FloorIndex, RoomType RoomType) [0x00000] in <filename unknown>:0
  at Room.SeedEntity (.GameEntityTypeData EntityTypeData, Vector2 spawnPoint, .MersenneTwister Random, Int32 FloorIndex, System.String SourceNameForErrorLog) [0x00000] in <filename unknown>:0
  at CombatEncounter+<>c__DisplayClass27_0.<Create>b__0 (.ArcenXMLElement Node) [0x00000] in <filename unknown>:0
  at ArcenXML.CustomProcessLoadedXml (.ArcenXMLElement Root, .CustomXmlProcessor Processor) [0x00000] in <filename unknown>:0
  at ArcenXML.CustomProcessXML (System.String FilePath, .CustomXmlProcessor Processor) [0x00000] in <filename unknown>:0
  at CombatEncounter.Create (Vector2 SpawnPoint, Int32 FloorIndex, Boolean CopyStuffFromOldPlayerEntity, .GameEntity oldPlayerEntity, System.Collections.Generic.List`1 modifiersBeforeSwitch, System.Collections.Generic.List`1 modifiersForShotsBeforeSwitch) [0x00000] in <filename unknown>:0
  at CombatEncounter.Create (Vector2 SpawnPoint, Int32 FloorIndex) [0x00000] in <filename unknown>:0
  at Game.ReloadTestChamber () [0x00000] in <filename unknown>:0
  at EscapeMenu+<>c.<SubclassInit>b__14_2 (ClickType <Click>) [0x00000] in <filename unknown>:0
  at ArcenQueuedButtonClickDelegate.Execute () [0x00000] in <filename unknown>:0
  at ArcenGUIManager.DrawGUI () [0x00000] in <filename unknown>:0
  at MainCameraLogic.OnGUI () [0x00000] in <filename unknown>:0
Stack Trace:   at GameEntityTypeData.GetReplacementToUse (.MersenneTwister Random, Int32 FloorIndex, RoomType RoomType) [0x00000] in <filename unknown>:0
  at Room.SeedEntity (.GameEntityTypeData EntityTypeData, Vector2 spawnPoint, .MersenneTwister Random, Int32 FloorIndex, System.String SourceNameForErrorLog) [0x00000] in <filename unknown>:0
  at CombatEncounter+<>c__DisplayClass27_0.<Create>b__0 (.ArcenXMLElement Node) [0x00000] in <filename unknown>:0
  at ArcenXML.CustomProcessLoadedXml (.ArcenXMLElement Root, .CustomXmlProcessor Processor) [0x00000] in <filename unknown>:0
  at ArcenXML.CustomProcessXML (System.String FilePath, .CustomXmlProcessor Processor) [0x00000] in <filename unknown>:0
  at CombatEncounter.Create (Vector2 SpawnPoint, Int32 FloorIndex, Boolean CopyStuffFromOldPlayerEntity, .GameEntity oldPlayerEntity, System.Collections.Generic.List`1 modifiersBeforeSwitch, System.Collections.Generic.List`1 modifiersForShotsBeforeSwitch) [0x00000] in <filename unknown>:0
  at CombatEncounter.Create (Vector2 SpawnPoint, Int32 FloorIndex) [0x00000] in <filename unknown>:0
  at Game.ReloadTestChamber () [0x00000] in <filename unknown>:0
  at EscapeMenu+<>c.<SubclassInit>b__14_2 (ClickType <Click>) [0x00000] in <filename unknown>:0
  at ArcenQueuedButtonClickDelegate.Execute () [0x00000] in <filename unknown>:0
  at ArcenGUIManager.DrawGUI () [0x00000] in <filename unknown>:0
  at MainCameraLogic.OnGUI () [0x00000] in <filename unknown>:0
What do you do?

A: You probably mispelled the name of the room. Check spelling punctuation, etc. If that still doesn't work, copy in a line from another test chamber with a good working room. (don't use mine).
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 Hearteater

  • Core Member
  • *****
  • Posts: 2,334
Re: XML questions and answers
« Reply #198 on: February 19, 2016, 04:17:55 am »
Is there a way to reload XML you've changed without quiting and restarting Starward Rogue? DevScripts appear to be loaded from disk each time they are used, but the rest appear to only be loaded from disk when the game starts.

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: XML questions and answers
« Reply #199 on: February 19, 2016, 04:22:37 am »
ctrl+f4
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 Hearteater

  • Core Member
  • *****
  • Posts: 2,334
Re: XML questions and answers
« Reply #200 on: February 19, 2016, 05:09:01 am »
Very helpful, thanks!

Also, is there any way to get a bullet that is using angle_from_parent or offset_from_parent to collide with terrain? Once either of those <change> commands are present, the shot appears to completely ignore walls. That's fine when I'm using orbitals, but in this case I want the pattern of bullets to move relative to the core, but die if they happen to touch a wall. I tried never_collides_with_terrain="false" and that doesn't do it.

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: XML questions and answers
« Reply #201 on: February 19, 2016, 05:14:20 am »
Not to my knowledge. Misery was having the same issue and created a thread about it a few days ago.

My solution was to have the rotation bullet have a short life and then be replaced.
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 Hearteater

  • Core Member
  • *****
  • Posts: 2,334
Re: XML questions and answers
« Reply #202 on: February 19, 2016, 02:07:26 pm »
Ok, that won't really work in my case because the distance between the center and edge is too great. You still get shots passing through walls for long enough to look wonky.

Is there a way to add a movement vector to its current movement? Like giving a shot a push on a given angle with a certain speed? So unlike how <change relative="true" angle="[a]" speed="[s ]" /> adds [a] and [s ] to current angle A and speed S of the shot directly (A = A + a, S = S + s), it instead would set A and S as follows:
S = SQRT(S^2 + s^2 - 2 * S^2 * s^2 * cos(A - a))
A = asin(sin(A - a) * s / S) {where S is the above calculated value}
« Last Edit: February 19, 2016, 02:10:56 pm by Hearteater »

Offline Ayrix

  • Newbie Mark III
  • *
  • Posts: 42
Re: XML questions and answers
« Reply #203 on: February 19, 2016, 02:09:27 pm »
Very helpful, thanks!

Also, is there any way to get a bullet that is using angle_from_parent or offset_from_parent to collide with terrain? Once either of those <change> commands are present, the shot appears to completely ignore walls. That's fine when I'm using orbitals, but in this case I want the pattern of bullets to move relative to the core, but die if they happen to touch a wall. I tried never_collides_with_terrain="false" and that doesn't do it.
my solution was to never have angle_from_parent or offset_from_parent on the bullets of the pattern, but rather only on bullets that draw the pattern.
You can make your bullets (as they are now) invisible but spawn bullets without the offending nodes, that don't move and with short lifetimes.


Offline Hearteater

  • Core Member
  • *****
  • Posts: 2,334
Re: XML questions and answers
« Reply #204 on: February 19, 2016, 02:13:11 pm »
Ok, that might work. Thanks!

Offline Hearteater

  • Core Member
  • *****
  • Posts: 2,334
Re: XML questions and answers
« Reply #205 on: February 20, 2016, 05:00:53 pm »
How do I <change angle="?"> a shot to point towards the player without spawning a new shot? I found spawning a new bullet (which auto-faces the player) and then just letting the old bullet die works, but that seems wasteful and silly. Am I missing something?

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: XML questions and answers
« Reply #206 on: February 20, 2016, 05:06:34 pm »
Try:
<change angle="0" relative="ToPlayer"/>
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 TheVampire100

  • Master Member
  • *****
  • Posts: 1,382
  • Ordinary Vampire
Re: XML questions and answers
« Reply #207 on: February 22, 2016, 04:39:42 am »
Can you see or modify how much xp an enemy gives on defeat? Couldn't find it digging through the enemy systems.

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: XML questions and answers
« Reply #208 on: February 22, 2016, 05:01:49 am »
No.
It used to be you could set the value, but it was lost when ability points transitioned into experience.
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 TheVampire100

  • Master Member
  • *****
  • Posts: 1,382
  • Ordinary Vampire
Re: XML questions and answers
« Reply #209 on: February 22, 2016, 05:37:25 pm »
Goddammit, I wanted to change it, so you get a bonus when you beat a boss on perfect.