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

Offline ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: [.80X] xml questions and answers
« Reply #30 on: January 15, 2016, 09:00:05 pm »
Oy. Sorry about not including the system file. I fixed the download in my previous post, so it now has all the files.

The story of how I came up with it is.. well odd I guess. It started with:

I should make levels that are references back to old video game references, with the first 2 being Pacman and Space Invaders. While I was working on trying to find reasonable and interesting shots for the enemies in the Space Invaders level, I ran into them firing a grid of shots, that were virtually pixels in an image. This then sent me down the route of trying to create pixel art using rooms and shots. The Brain room is an example of that, wherein I did an axial brain view and used it as the floor diagram for the room. Then I started exploring cave art as it would be neat to have mysterious rooms that tugged on unconscious/subliminal memories in player's heads. However, the largest regular rooms are only around 30x30, which doesn't give you much room to work with. That then resulted in me looking around to see what recognizable images you could have at sizes less than 20x20, which lead to flags (11x16 or 11x13 depending on the icon set).

The rocket frog was actually spawned by your conversation with Keith and since no one else wanted to make one, I decided I should give it a shot. That lead to more adventures with Periodic_Movement_Mode. After that I was trying to figure out how to make a frog-related shot, which lead me to thinking about circling flies being shot by the frog. Which lead me to taking the flags and causing them to rotate. And that leads us up to now.

So yeah, it is a strange place over here.
I've attached some screenshots of "fun".
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 #31 on: January 18, 2016, 05:50:35 pm »
So now with the closing deadline, I'm going to start asking more pointed questions and posting code if anyone wants some half-baked ideas. Plus ZHA putting out 9 variants made me realize I was a huge slacker and i should submit something for all the time I've spent on this.

Name: Healing or Shielding Bot
Concept: An enemy ship that makes nearby enemies stronger, either by healing them or giving them shields.
Progress: Doesn't seem to work. No entities seem to gain health or shields as I tried various variants.
Code: [Select]
Code:
    <system name="ShieldAddSystem"
category="DirectUseSystem"
     shot_type="Invisible"
     damage_type="Ballistic"
     attack_power="1" fire_rate="2"
     range_actual="500"  cue_time="0"
     shots_per_salvo="1"
     targeting_logic="Dumbfire" firing_timing="AllTheTime"
     image_name="Invisible"
     initial_firing_delay="0"
distance_threshold_modifiers_applied_to_nearby_entities="500"
modifiers_applied_to_nearby_entities_can_target_allies="true"
modifiers_applied_to_nearby_entities_can_target_enemies="true"
     >
<modifier target="NearbyEntities" type="MaxHealth" math="add" magnitude="50" timing="OnUse_ParentEntity"/>
  </system>

Name: PeriodicMovementMode Ships
Concept: Using movement to make interesting enemies.
Progress: Keith fixed the exit PeriodicMovementMode problem, but the modes still seem buggy. ShadowDash ships tend to stay phased out. Reposition requires a fixed movement point to relocate to, which is bad for random enemy rooms.

Code: [Select]
<entity name="bob" category="Ship" ship_category="Wander_3x3"
   display_name="bob"
   behavior="Attacker"
   speed="100"
   max_health="100"
    periodic_movement_mode_interval_min="2"
periodic_movement_mode_interval_max="5"
image_folder="Enemy_Pursuers"
image_name="ChargerWhite"
>
   <hitbox radius="26" />
   <periodic_movement_mode type="ShadowDash" chance_to_target_player="50" shockwave_radius ="50">
      <modifier type="MovementSpeed" math="Set" magnitude="1000" />
   </periodic_movement_mode>
    <periodic_movement_mode type="Reposition" related_point="5,5">
<modifier type="MovementSpeed" math="Set" magnitude="1000" />
</periodic_movement_mode>
</entity>

Name:Flag Shots
Concept: Shoot pixel art based flags at the player.
Progress: It works completely. However, more than 3 flags on screen tends to tank frame rate. Possibly due to just how many shots there are generated, 176 shots per flag. It might be reduced by stopping them from spinning and removing the wall collision. The other part is they don't seem to match the game's tone. And yes, that is a pirate alien flag.

Code: [Select]
The code is available in a zip earlier in the thread. There is a lot of it. Below is just a part sufficient to get the idea.
    <entity name="RocketFrog" ship_category="Wander_3x3"
    category="Ship"
    display_name="Rocket Frog"
    behavior="Wanderer"
    speed="50" acceleration="100"
    max_health="100"
    image_folder="Enemy_Pursuers" image_name="ChargerWhite"
    time_to_visually_rotate_180_degrees="0.7"
    >
    <hitbox radius="26" />
<system type="FlagTestSystem" offset="0,0" />
  </entity>
    <system name="FlagTestSystem"
category="Weapon"
     shot_type="BulletPointedYellow"
     damage_type="Ballistic"
     attack_power="-1" fire_rate="3"
     range_actual="2000"  cue_time="0"
     shots_per_salvo="1"
     targeting_logic="Direct" firing_timing="AllTheTime"
     image_name="Invisible" special_bullet_patterns="FlagPIRAPattern"
     initial_firing_delay="1"
     >
  </system>
<var name="FlagShot2134312">
$FlagShot SHOT=[SHOT2] SPOSX=0
$FlagShot SHOT=[SHOT2] SPOSX=10
$FlagShot SHOT=[SHOT1] SPOSX=20
$FlagShot SHOT=[SHOT2] SPOSX=30
$FlagShot SHOT=[SHOT2] SPOSX=40
$FlagShot SHOT=[SHOT2] SPOSX=50
$FlagShot SHOT=[SHOT1] SPOSX=60
$FlagShot SHOT=[SHOT1] SPOSX=70
$FlagShot SHOT=[SHOT1] SPOSX=80
$FlagShot SHOT=[SHOT1] SPOSX=90
$FlagShot SHOT=[SHOT2] SPOSX=100
$FlagShot SHOT=[SHOT2] SPOSX=110
$FlagShot SHOT=[SHOT2] SPOSX=120
$FlagShot SHOT=[SHOT1] SPOSX=130
$FlagShot SHOT=[SHOT2] SPOSX=140
$FlagShot SHOT=[SHOT2] SPOSX=150
</var>
<var name="FlagShot1316131">
$FlagShot SHOT=[SHOT2] SPOSX=0
$FlagShot SHOT=[SHOT1] SPOSX=10
$FlagShot SHOT=[SHOT1] SPOSX=20
$FlagShot SHOT=[SHOT1] SPOSX=30
$FlagShot SHOT=[SHOT2] SPOSX=40
$FlagShot SHOT=[SHOT1] SPOSX=50
$FlagShot SHOT=[SHOT1] SPOSX=60
$FlagShot SHOT=[SHOT1] SPOSX=70
$FlagShot SHOT=[SHOT1] SPOSX=80
$FlagShot SHOT=[SHOT1] SPOSX=90
$FlagShot SHOT=[SHOT1] SPOSX=100
$FlagShot SHOT=[SHOT2] SPOSX=110
$FlagShot SHOT=[SHOT1] SPOSX=120
$FlagShot SHOT=[SHOT1] SPOSX=130
$FlagShot SHOT=[SHOT1] SPOSX=140
$FlagShot SHOT=[SHOT2] SPOSX=150
</var>
<var name="FlagShot484">
$FlagShot SHOT=[SHOT2] SPOSX=0
$FlagShot SHOT=[SHOT2] SPOSX=10
$FlagShot SHOT=[SHOT2] SPOSX=20
$FlagShot SHOT=[SHOT2] SPOSX=30
$FlagShot SHOT=[SHOT1] SPOSX=40
$FlagShot SHOT=[SHOT1] SPOSX=50
$FlagShot SHOT=[SHOT1] SPOSX=60
$FlagShot SHOT=[SHOT1] SPOSX=70
$FlagShot SHOT=[SHOT1] SPOSX=80
$FlagShot SHOT=[SHOT1] SPOSX=90
$FlagShot SHOT=[SHOT1] SPOSX=100
$FlagShot SHOT=[SHOT1] SPOSX=110
$FlagShot SHOT=[SHOT2] SPOSX=120
$FlagShot SHOT=[SHOT2] SPOSX=130
$FlagShot SHOT=[SHOT2] SPOSX=140
$FlagShot SHOT=[SHOT2] SPOSX=150
</var>
<var name="FlagShot4122214">
$FlagShot SHOT=[SHOT2] SPOSX=0
$FlagShot SHOT=[SHOT2] SPOSX=10
$FlagShot SHOT=[SHOT2] SPOSX=20
$FlagShot SHOT=[SHOT2] SPOSX=30
$FlagShot SHOT=[SHOT1] SPOSX=40
$FlagShot SHOT=[SHOT2] SPOSX=50
$FlagShot SHOT=[SHOT2] SPOSX=60
$FlagShot SHOT=[SHOT1] SPOSX=70
$FlagShot SHOT=[SHOT1] SPOSX=80
$FlagShot SHOT=[SHOT2] SPOSX=90
$FlagShot SHOT=[SHOT2] SPOSX=100
$FlagShot SHOT=[SHOT1] SPOSX=110
$FlagShot SHOT=[SHOT2] SPOSX=120
$FlagShot SHOT=[SHOT2] SPOSX=130
$FlagShot SHOT=[SHOT2] SPOSX=140
$FlagShot SHOT=[SHOT2] SPOSX=150
</var>
<var name="FlagShot3116113">
$FlagShot SHOT=[SHOT2] SPOSX=0
$FlagShot SHOT=[SHOT2] SPOSX=10
$FlagShot SHOT=[SHOT2] SPOSX=20
$FlagShot SHOT=[SHOT1] SPOSX=30
$FlagShot SHOT=[SHOT2] SPOSX=40
$FlagShot SHOT=[SHOT1] SPOSX=50
$FlagShot SHOT=[SHOT1] SPOSX=60
$FlagShot SHOT=[SHOT1] SPOSX=70
$FlagShot SHOT=[SHOT1] SPOSX=80
$FlagShot SHOT=[SHOT1] SPOSX=90
$FlagShot SHOT=[SHOT1] SPOSX=100
$FlagShot SHOT=[SHOT2] SPOSX=110
$FlagShot SHOT=[SHOT1] SPOSX=120
$FlagShot SHOT=[SHOT2] SPOSX=130
$FlagShot SHOT=[SHOT2] SPOSX=140
$FlagShot SHOT=[SHOT2] SPOSX=150
</var>
<var name="FlagShot123121321">
$FlagShot SHOT=[SHOT2] SPOSX=0
$FlagShot SHOT=[SHOT1] SPOSX=10
$FlagShot SHOT=[SHOT1] SPOSX=20
$FlagShot SHOT=[SHOT2] SPOSX=30
$FlagShot SHOT=[SHOT2] SPOSX=40
$FlagShot SHOT=[SHOT2] SPOSX=50
$FlagShot SHOT=[SHOT1] SPOSX=60
$FlagShot SHOT=[SHOT2] SPOSX=70
$FlagShot SHOT=[SHOT2] SPOSX=80
$FlagShot SHOT=[SHOT1] SPOSX=90
$FlagShot SHOT=[SHOT2] SPOSX=100
$FlagShot SHOT=[SHOT2] SPOSX=110
$FlagShot SHOT=[SHOT2] SPOSX=120
$FlagShot SHOT=[SHOT1] SPOSX=130
$FlagShot SHOT=[SHOT1] SPOSX=140
$FlagShot SHOT=[SHOT2] SPOSX=150
</var>
<var name="FlagShotPirateShot">
$FlagShot16 SHOT=[SHOT2] SPOSY=-50
$FlagShot2134312 SPOSY=-40
$FlagShot1316131 SPOSY=-30
$FlagShot484 SPOSY=-20
$FlagShot4122214 SPOSY=-10
$FlagShot4122214 SPOSY=-0
$FlagShot484 SPOSY=10
$FlagShot3116113 SPOSY=20
$FlagShot123121321 SPOSY=30
$FlagShot2134312 SPOSY=40
$FlagShot16 SHOT=[SHOT2] SPOSY=50
</var>
<var name="FlagShot16">
$FlagShot SHOT=[SHOT] SPOSX=0
$FlagShot SHOT=[SHOT] SPOSX=10
$FlagShot SHOT=[SHOT] SPOSX=20
$FlagShot SHOT=[SHOT] SPOSX=30
$FlagShot SHOT=[SHOT] SPOSX=40
$FlagShot SHOT=[SHOT] SPOSX=50
$FlagShot SHOT=[SHOT] SPOSX=60
$FlagShot SHOT=[SHOT] SPOSX=70
$FlagShot SHOT=[SHOT] SPOSX=80
$FlagShot SHOT=[SHOT] SPOSX=90
$FlagShot SHOT=[SHOT] SPOSX=100
$FlagShot SHOT=[SHOT] SPOSX=110
$FlagShot SHOT=[SHOT] SPOSX=120
$FlagShot SHOT=[SHOT] SPOSX=130
$FlagShot SHOT=[SHOT] SPOSX=140
$FlagShot SHOT=[SHOT] SPOSX=150
</var>
  <var name="FlagShot">
    <bullet angle="[ANGLE]" speed="[SPEED]" shot_type="[SHOT]" spawn_offset ="[SPOSX],[SPOSY]">
<change self_scale="0.5" />
<wait time="0.5" />
<loop iterations="5">
  <change angle="45" time="0.0001" />
      <wait time=".5" />
  <change angle="90" time="0.0001" />
      <wait time=".5" />
  <change angle="135" time="0.0001" />
      <wait time=".5" />
  <change angle="180" time="0.0001" />
      <wait time=".5" />
  <change angle="225" time="0.0001" />
      <wait time=".5" />
  <change angle="270" time="0.0001" />
      <wait time=".5" />
  <change angle="315" time="0.0001" />
      <wait time=".5" />
  <change angle="0" time="0.0001" />
      <wait time="1" />
  <wait time="2" />
  </loop>
    </bullet>
  </var>
<bullet_pattern name="FlagPIRAPattern">
$FlagShotPirateShot SPEED=260 ANGLE=0 SHOT1=WingsWhite SHOT2=WingsTrueBlue
</bullet_pattern>

Name: Spawn Ships when hit
Concept: When you hit an enemy ship with a shot, it spawns a defensive enemy.
Progress: Dayton created this for the player ships already, I simply stole his code and changed it a little to work for enemies. By itself it isn't enough to create an interesting enemy. It also needs to be change to use the new enemy familiar ship category.
Code: [Select]
  <system name="FrogRevengeRamSystem"
          category="DirectUseSystem"
          firing_timing="WhenParentEntityHit"
          fire_rate="1"
          image_name="Invisible"
          display_name="Revenge Rams" description="Spawns a Ram whenever you're hit."
          spawns_entity="Ram2"
          >
  </system>
    <entity name="Ram2" ship_category="Familiar"
          category="Ship" is_not_ready_to_seed="true"
          familiar_type="NormalShipBehavior" behavior="FamiliarRam" familiar_ram_charge_distance="500"
          speed="100"
  max_health = "50"
          display_name="Ram" description="Deploys a ram to attack any nearby enemy."
          image_folder="Familiars"
  image_name="Ram"
          familiar_regenerates_after_current_room="false"
          is_familiar_that_dies_when_parent_dies="true"
          >
    <hitbox radius="18"/>
    <system type="RamRam" offset="0,0"/>
  </entity>

Name: Shadow Clone Jitsu
Concept: When a ship is hit, fake copies of the ship appear to confuse the player, only one is real.
Progress: Generating a ship when an enemy is hit is done the same was as the previous entry. That's easy. The movement pattern to get the clones to not all sit on top of the spawning ship and to get the original spawning ship to mix itself up with the clones hasn't been accomplished. The other problem is that when I play, I take the strategy of more DAKKA is good DAKKA. So I hose everything with bullets. Even with the enemy producing fake bullets for me to dodge, it didn't really click for me.

Code: [Select]
see above

Name: Miniboss Maze Room
Concept: You have a room filled with a maze of 1 cell-wide paths. There are normal enemies in it and there is a miniboss chasing monster. You have to dodge the Miniboss while doing something else.
Progress: I couldn't make the Miniboss dangerous enough without making him too dangerous. Either he is faster and can always catch up to the player, or not fast enough and can be simply kited. I also tried creating a boundary zone on the outside of the maze (think a shark cage with the shark miniboss on the outside), using a 3-cell wide zone and 3x3 pathfinding on the miniboss, but he tended to get stuck and still didn't seem interesting. Another possibility was to have the miniboss continue to spawn smaller maze-fittable chasers to keep you under pressure, but it still didn't work for me. If someone can get something going out of this, go for it.
Code: [Select]
d,,,,,,,,...,,,,,,,,d
,,,,,,,,,,,,,,,,,,,,,
,,sss,ss,ssss,ss,ss,,
,,s,,,,,,,,,,,,,,,s,,
,,s,ssss,ss,ss,ss,s,,
,,,,,,,,,,+,,,,,s,,,,
,,s,s,ss,sss,ss,s,s,,
,,s,s,s,,,,,,,s,s,s,,
,,,,s,s,ss,ss,,,,,s,,
.,s,,,,,s111s,s,s,s,.
.,s,s,s,,1B1s,s,s,,,.
.,,,s,s,s111,,,,,,s,.
,,s,s,,,s,sss,s,s,s,,
,,s,s,s,,,,,,,s,s,,,,
,,s,,,ss,ss,sss,,,s,,
,,s,s,,,,,,,,,,,s,s,,
,,,,sss,ss,s,ssss,,,,
,,s,,,,,,,,,,,,,,,s,,
,,ss,ss,sss,ssss,ss,,
,,,,,,,,,,,,,,,,,,,,,
d,,,,,,,,...,,,,,,,,d
   <entity name="MazeMaster"
          ship_category="Miniboss"
          display_name="MazeMaster"
          behavior="PathfindingAttacker"
          category="Ship"
          speed="1000"
  acceleration="25"
  turning_resistance="10"
  decceleration="25"
          max_health="1000"
          image_folder="Enemy_LargeChaos"
          image_name="HunterWhite"
          wall_collision_reduction="-17"
          time_to_visually_rotate_180_degrees=".1">
<system type="MazeDroneBaySystem" offset="0,0" />
    <hitbox radius="46" offset="0,0"/>
    <room src="Miniboss/PT_Maze" />
  </entity>
    <entity name="PTMazeSlow" ship_category="Pursuer_1x1"
    category="Ship"
    display_name="Maze Minion Slow"
    behavior="CardinalMover"
    speed="400" acceleration="50"
    max_health="50"
    image_folder="Enemy_Pursuers" image_name="FaceripperBlue"
    time_to_visually_rotate_180_degrees="0.7"
    >
    <hitbox radius="26" />
  </entity>
   
    <entity name="PTMazeFast" ship_category="DeadlyPursuer_1x1"
    category="Ship"
    display_name="Maze Minion Fast"
    behavior="PathfindingAttacker"
    speed="500" acceleration="50"
    max_health="100"
    image_folder="Enemy_Pursuers" image_name="FaceripperGreen"
    time_to_visually_rotate_180_degrees="0.7"
    >
    <hitbox radius="26" />
  </entity>
  <entity name="PTMazeSlowSpawn" ship_category="Pursuer_1x1"
    category="Ship"
    display_name="Maze Minion Slow"
    behavior="CardinalMover"
    speed="400" acceleration="50"
    max_health="50"
    image_folder="Enemy_Pursuers" image_name="ChargerBlack"
    time_to_visually_rotate_180_degrees="0.7"
    >
    <hitbox radius="26" />
  </entity>
    <entity name="PTMazeFastSpawn" ship_category="DeadlyPursuer_1x1"
    category="Ship"
    display_name="Maze Minion Fast"
    behavior="PathfindingAttacker"
    speed="500" acceleration="50"
    max_health="100"
    image_folder="Enemy_Pursuers" image_name="ChargerWhite"
    time_to_visually_rotate_180_degrees="0.7"
    >
    <hitbox radius="26" />
  </entity>

Name: Space Invader Boss
Concept: A homage boss room based on the game Space Invaders.
Progress: Zamboni movement really suggested this one. I have everything set up, but I just can't find the part that makes it more fun.
Code: [Select]
<system name="InvaderSystem1"
category="Weapon"
shot_type="SpineWhite"
damage_type="Ballistic"
attack_power="1"
fire_rate="4"
cue_time = "0"
range_actual="1400"
shots_per_salvo="1"
shot_speed="250"
targeting_logic="Direct"
firing_timing="AllTheTime"
image_name="Invisible"
initial_firing_delay ="8"
>
  </system>
    <system name="HoldFire1System"
category = "DirectUseSystem"
firing_timing="5"
fire_rate="5"
image_name="Invisible"
>
  </system>
  <system name="InvaderSystem2"
category="Weapon"
shot_type="SpineGreen"
damage_type="Ballistic"
attack_power="1"
fire_rate="2"
cue_time = "0"
range_actual="1400"
shots_per_salvo="1"
shot_speed="250"
targeting_logic="Direct"
firing_timing="AllTheTime"
image_folder="Simpler"
image_name="Invisible"
initial_firing_delay ="8"
>
  </system>
  <system name="InvaderSystem3"
category="Weapon"
shot_type="SpineTrueBlue"
damage_type="Ballistic"
attack_power="1"
fire_rate="3"
cue_time = "0"
range_actual="1400"
shots_per_salvo="1"
shot_speed="250"
targeting_logic="Direct"
firing_timing="AllTheTime"
image_folder="Simpler"
image_name="Invisible"
do_parallel_salvo_with_spacing="0"
salvo_angle_difference="5"
initial_firing_delay ="8"
fires_salvos_sequentially="true"
>
  </system>
  <system name="InvaderSystem4"
category="Weapon"
shot_type="SpineEmblazonedYellow"
damage_type="Ballistic"
attack_power="1"
fire_rate="2"
cue_time = "0"
range_actual="1400"
shots_per_salvo="3"
shot_speed="450"
targeting_logic="Dumbfire"
firing_timing="OnlyInRange"
image_folder="Simpler"
image_name="Invisible"
initial_firing_delay ="0"
fires_salvos_sequentially="false"
do_parallel_salvo_with_spacing = "10"
>
  </system>
  <system name="InvaderSystem5"
category="Weapon"
shot_type="SpineTrueBlue"
damage_type="Ballistic"
attack_power="1"
fire_rate="2.4"
cue_time = "0"
range_actual="1400"
shots_per_salvo="3"
shot_speed="350"
targeting_logic="Dumbfire"
firing_timing="AllTheTime"
image_folder="Simpler"
image_name="Invisible"
initial_firing_delay ="0"
salvo_angle_difference="5"
>
  </system>
<entity name="InvaderMinion1" ship_category="Wander_3x3"
display_name="Invader"
    behavior="Zamboni" category="Ship"
    speed="300"
    max_health="10"
    image_folder="Enemy_SmallMobile" image_name="AmberBarrage"
    wall_collision_reduction="-15"
    time_to_visually_rotate_180_degrees="0.3"
on_death_drops_ability_points="0"
always_faces_player ="true"
>
    <system type="InvaderSystem1" offset="0,0" />
<system type="HoldFire1System" offset="0,0" />
    <hitbox radius="37" offset="-10,0" />
  </entity>
    <entity name="InvaderMinion2" ship_category="Wander_3x3"
display_name="Invader"
    behavior="Zamboni" category="Ship"
    speed="300"
    max_health="20"
    image_folder="Enemy_SmallMobile" image_name="GreenBomber"
    wall_collision_reduction="-15"
    time_to_visually_rotate_180_degrees="0.3"
on_death_drops_ability_points="0"
always_faces_player ="true"
>
    <system type="InvaderSystem2" offset="0,0" />
    <hitbox radius="37" offset="-10,0" />
  </entity>
    <entity name="InvaderMinion3" ship_category="Wander_3x3"
display_name="Invader"
    behavior="Zamboni" category="Ship"
    speed="300"
    max_health="30"
    image_folder="Enemy_SmallMobile" image_name="BlueBomber"
    wall_collision_reduction="-15"
    time_to_visually_rotate_180_degrees="0.3"
on_death_drops_ability_points="0"
always_faces_player ="true"
>
    <system type="InvaderSystem3" offset="0,0" />
    <hitbox radius="37" offset="-10,0" />
  </entity>
    <entity name="InvaderMinion4" ship_category="Wander_3x3"
display_name="Invader"
    behavior="Zamboni" category="Ship"
    speed="300"
    max_health="40"
    image_folder="Enemy_SmallMobile" image_name="MiniSwarmBlueGreen"
    wall_collision_reduction="-15"
    time_to_visually_rotate_180_degrees="0.3"
on_death_drops_ability_points="0"
always_faces_player ="true"
>
    <system type="InvaderSystem4" offset="0,0" />

    <hitbox radius="37" offset="-10,0" />
  </entity>
    <entity name="InvaderMinion5" ship_category="Wander_3x3"
display_name="Invader"
    behavior="Zamboni" category="Ship"
    speed="300"
    max_health="50"
    image_folder="Enemy_SmallMobile" image_name="MiniSwarmBlueOrange"
    wall_collision_reduction="-15"
    time_to_visually_rotate_180_degrees="0.3"
on_death_drops_ability_points="0"
always_faces_player ="true"
>
    <system type="InvaderSystem5" offset="0,0" />
    <hitbox radius="37" offset="-10,0" />
  </entity>
  <entity name="InvaderBoss" ship_category="Boss" knockback_resistance="1"
   display_name="Invader"
   behavior="Zamboni" category="Ship"
   speed="200" never_changes_angle_after_spawn="true"
   max_health="500" wall_collision_reduction="-20"
   image_folder="Enemy_Bosses" image_name="CrystalMother"
   starting_angle="0"
   on_death_shot_clearing_explosion_radius="2000"
   do_not_seed_until_x_floors_down="1"
   invincible_while_in_same_room_with="InvaderMinion1,InvaderMinion2,InvaderMinion3,InvaderMinion4,InvaderMinion5"
>
    <system type="InvaderBossSystem" offset="0,0" />
    <hitbox radius="60" offset="0,0" />
    <room src="Boss_Large/Pt_BossSpaceInvader4" buddies="InvaderMinion1,InvaderMinion2,InvaderMinion3,InvaderMinion4,InvaderMinion5"/>
<system type="FrogRevengeRamSystem" offset="0,0" />
  </entity>
  <entity name="PTGhost" ship_category="Pursuer_1x1"
    category="Ship"
    display_name="Blue Ghost-CardinalMover"
    behavior="CardinalMover"
    speed="500" acceleration="50"
    max_health="25"
    image_folder="Enemy_Pursuers" image_name="FaceripperBlue"
    time_to_visually_rotate_180_degrees="0.7"
    >
    <hitbox radius="26" />

  </entity>

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,IIIIIIIIIIIIIIIIIIIIII,,,,,,,
,,IIIIIIIIIIIIIIIIIIIIII.,,,,,,
,,II.......................,,,,
,,II.U.U.U.U.U.............,,,,
,,II........................,,,
,,II.U.U.U.U.U.............II,,
,,II..................yss..II,,
,,II.U.U.U.U.U........ysb..II,,
,,II..................yss..II,,
,,II.U.U.U.U.U.............II,,
,,II.......................II,,
,,II.U.U.U.U.U.............II,,
,,II..................yss..II,,
+,IIBU.U.U.U.U........ysb.+II,+
,,II..................yss..II,,
,,II.U.U.U.U.U.............II,,
,,II.......................II,,
,,II.U.U.U.U.U.............II,,
,,II..................yss..II,,
,,II.U.U.U.U.U........ysb..II,,
,,II..................yss..II,,
,,II.U.U.U.U.U.............II,,
,,II........................,,,
,,II.U.U.U.U.U.............,,,,
,,II.......................,,,,
,,IIIIIIIIIIIIIIIIIIIIII.,,,,,,
,,IIIIIIIIIIIIIIIIIIIIII,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Name: Intermittent Fire
Concept: Probabilistic Firing patterns that are not fixed
Progress: I thought maybe adding a blank system that took X seconds to fire, but failed to generate a shot would work to allow for staggering shots, but I couldn't get it to work. This was inspired by the Space Invader room, having all 55 enemies constantly firing made for a busy room. The code I have left is completely stripped out as I gutted it to stop it from throwing XML issues, but still have a reminder of it.
Code: [Select]
    <system name="HoldFire1System"
category = "DirectUseSystem"
firing_timing="5"
fire_rate="5"
image_name="Invisible"
>
  </system>
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 PokerChen

  • Hero Member Mark III
  • *****
  • Posts: 1,088
Re: [.80X] xml questions and answers
« Reply #32 on: January 18, 2016, 06:33:44 pm »
In your defense, I wrote only three enemy types, each with three variants based on floor difficulty.

May have time before release to also see if there's workarounds for some of your ideas.

Offline Misery

  • Arcen Volunteer
  • Core Member Mark V
  • *****
  • Posts: 4,109
Re: [.80X] xml questions and answers
« Reply #33 on: January 18, 2016, 06:35:39 pm »
I can probably finish the concept of the maze miniboss myself; I already have an idea as to what could happen there.

Who says it necessarily needs to get close for all it's damage, after all?

Offline PokerChen

  • Hero Member Mark III
  • *****
  • Posts: 1,088
Re: [.80X] xml questions and answers
« Reply #34 on: January 18, 2016, 07:33:01 pm »
About the Healership, have you tried making a weapon that explodes, does friendly fire, and do negative damage?

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: [.80X] xml questions and answers
« Reply #35 on: January 18, 2016, 07:37:56 pm »
You could have a system with an on-use effect that increases the hull health of all enemies.

Or you could have a system with:
modifiers_applied_to_nearby_entities_can_target_allies="true"
modifiers_applied_to_nearby_entities_can_target_enemies="true"
distance_threshold_modifiers_applied_to_nearby_entities="(whatever range)"

and a modifier with target="NearbyEntities", type="DamagePerSecond", math="Add", and a negative magnitude.

I don't vouch for spelling, syntax, or completeness ;)
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 #36 on: January 18, 2016, 07:47:38 pm »
About the Healership, have you tried making a weapon that explodes, does friendly fire, and do negative damage?

Shots require a non-zero integer. Negative integers do 0 damage. 0 damage causes an xml explosion.

Quote
You could have a system with an on-use effect that increases the hull health of all enemies.

Or you could have a system with:
modifiers_applied_to_nearby_entities_can_target_allies="true"
modifiers_applied_to_nearby_entities_can_target_enemies="true"
distance_threshold_modifiers_applied_to_nearby_entities="(whatever range)"

and a modifier with target="NearbyEntities", type="DamagePerSecond", math="Add", and a negative magnitude.

I don't vouch for spelling, syntax, or completeness ;)
That is hilarious. Although, per zharmad's question, negative damage seems to deal no damage, not heal.
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 #37 on: January 18, 2016, 07:49:16 pm »
Right, but this wouldn't be using the normal field for damage. I think negative DamagePerSecond does work.
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 #38 on: January 18, 2016, 09:21:25 pm »
Right, but this wouldn't be using the normal field for damage. I think negative DamagePerSecond does work.

Good point. I gave it a shot, but it still doesn't do anything. I looked around for someone using target="NearbyEntities" and couldn't find any, so the targeting logic may be broken for NearbyEntities (or I'm missing something obvious).

I then went on to test a few more things.
Code: [Select]
    <system name="ShieldAddSystem"
category="DirectUseSystem"
     shot_type="Invisible"
     damage_type="Ballistic"
     attack_power="1" fire_rate="1"
     range_actual="500"  cue_time="0"
     shots_per_salvo="1"
     targeting_logic="Dumbfire" firing_timing="AllTheTime"
     image_name="Invisible"
     initial_firing_delay="0"
distance_threshold_modifiers_applied_to_nearby_entities="500"
modifiers_applied_to_nearby_entities_can_target_allies="true"
modifiers_applied_to_nearby_entities_can_target_enemies="true"
     >
<modifier target="MyParentEntity" type="DamagePerSecond" math="add" magnitude="1" do_not_stack="true" duration="-1"/>
  </system>

Produces an effect that kills a 150 health ship in 9 ticks (seconds), a 100 health ship in 6 ticks, and a 50 health ship in 3 ticks. I have no idea what's going on. Giving the ship a -1 magnitude DamagerPerSecond  effect made them regenerate at the same rate. It does not however exceed the maximum health of the ship.
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 PokerChen

  • Hero Member Mark III
  • *****
  • Posts: 1,088
Re: [.80X] xml questions and answers
« Reply #39 on: January 19, 2016, 07:07:09 pm »
 Keith, is there any way for EnemyFamiliar Entities to influence their parent? For example, the familiar possesses an entity system that targets and damages/slows the parent when the familiar is hit.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: [.80X] xml questions and answers
« Reply #40 on: January 19, 2016, 07:19:40 pm »
Keith, is there any way for EnemyFamiliar Entities to influence their parent? For example, the familiar possesses an entity system that targets and damages/slows the parent when the familiar is hit.
I don't think there's anything like that implemented, no. You could have an enemy that, on death (or on hit, via a system that only triggers on-hit), triggers effects that affect all enemies. But not specifically the familiar's master.
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 #41 on: January 21, 2016, 01:07:16 am »
I was working with Zharmad and came up with the following neat idea, but I don't have any time to play with it right now.

Effect:
Ship leaves behind a trail of items. If the player doesn't run over the items (i.e., pick them up), they exploded into a massive dangerous shot.

How to:
Use a bullet_pattern with two nested bullets. Set the first bullet to have do_not_do_rest_of_logic_on_early_death="true" and damage_mult="0". This means that a player will not take damage when running over the shot and it will destroy itself instead of continuing to spawn normally. In the second bullet set damage_mult="1". Now the shot is dangerous. The length of the wait between the first and second shot is how long the player has to get rid of it before it turns active.

Here is the functional code in case my explanation is not sufficient.
Code: [Select]

  <var name="ZHAGraspingClawShortShot">
        <bullet angle="[REACH_ANGLE]" speed="[REACH_SPEED]" never_collides_with_terrain="true" shot_type="WidowShotWhite" damage_mult="0" do_not_do_rest_of_logic_on_early_death="true">       
        <change angle="[REACH_TURN]" relative="true" time="[TIME1]" />
        <change speed="0" time="0" />
        <wait time="[TIME2]" />
        <spawn>
        <bullet_pattern>
            <bullet angle="0" speed="[GRAB_SPEED]" shot_type="WidowShotRed"  damage_mult="1">       
            <change angle="[GRAB_TURN]" relative="true" time="[TIME3]" />           
            <die />
            </bullet>
        </bullet_pattern>
        </spawn>       
        <die />
        </bullet>
</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 ptarth

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,166
  • I'm probably joking.
Re: [.80X] xml questions and answers
« Reply #42 on: January 22, 2016, 10:00:03 pm »
So I manage to make the shotpattern interpolation mad at me.



Code: [Select]
<var name="RotaryShot2">
<bullet angle="[ANGLE]" speed="0" shot_type="[SHOT]" rotates_around_firing_entity="false" moves_with_firing_entity="true" spawns_offset_from_firing_entity="[CENTERX],[CENTERY]" never_collides_with_terrain="true" dumbfire="true">
<spawn>
<bullet_pattern>
$RotaryShot ROTSPEED=1 ANGLE=30 SHOT=QuadRed SPOSX=-100 SPOSY=100 SCALE=2 CENTERX=100 CENTERY=-100
$RotaryShot ROTSPEED=1 ANGLE=60 SHOT=QuadGreen SPOSX=-100 SPOSY=100 SCALE=2 CENTERX=100 CENTERY=-100
$RotaryShot ROTSPEED=1 ANGLE=90 SHOT=QuadGreen SPOSX=-100 SPOSY=100 SCALE=2 CENTERX=100 CENTERY=-100
$RotaryShot ROTSPEED=1 ANGLE=120 SHOT=QuadGreen SPOSX=-100 SPOSY=100 SCALE=2 CENTERX=100 CENTERY=-100
$RotaryShot ROTSPEED=1 ANGLE=150 SHOT=QuadGreen SPOSX=-100 SPOSY=100 SCALE=2 CENTERX=100 CENTERY=-100
$RotaryShot ROTSPEED=1 ANGLE=180 SHOT=QuadGreen SPOSX=-100 SPOSY=100 SCALE=2 CENTERX=100 CENTERY=-100
$RotaryShot ROTSPEED=1 ANGLE=210 SHOT=QuadGreen SPOSX=-100 SPOSY=100 SCALE=2 CENTERX=100 CENTERY=-100
$RotaryShot ROTSPEED=1 ANGLE=240 SHOT=QuadGreen SPOSX=-100 SPOSY=100 SCALE=2 CENTERX=100 CENTERY=-100
$RotaryShot ROTSPEED=1 ANGLE=270 SHOT=QuadGreen SPOSX=-100 SPOSY=100 SCALE=2 CENTERX=100 CENTERY=-100
$RotaryShot ROTSPEED=1 ANGLE=300 SHOT=QuadGreen SPOSX=-100 SPOSY=100 SCALE=2 CENTERX=100 CENTERY=-100
$RotaryShot ROTSPEED=1 ANGLE=330 SHOT=QuadGreen SPOSX=-100 SPOSY=100 SCALE=2 CENTERX=100 CENTERY=-100
$RotaryShot ROTSPEED=1 ANGLE=360 SHOT=QuadBlue SPOSX=-100 SPOSY=100 SCALE=2 CENTERX=100 CENTERY=-100
</bullet_pattern>
</spawn>
<loop iterations="-1">
<change offset_from_parent="[CENTERX],[CENTERY]" time="0"/>
</loop>
</bullet>
  </var>

<var name="RotaryShot">
<bullet angle="[ANGLE]" speed="0" shot_type="[SHOT]" rotates_around_firing_entity="false" moves_with_firing_entity="true" spawns_offset_from_firing_entity="[SPOSX],[SPOSY]" never_collides_with_terrain="true" dumbfire="true" offset_is_relative_to_parent_bullet_instead_of_firing_entity="true">
<loop iterations="-1">
<change offset_from_parent="[SPOSX],[SPOSY]" time="0"/>
<change relative="true" angle="180" time="1"/>
</loop>
            <die />
</bullet>
  </var>
  <bullet_pattern name="RotaryPattern">
  $RotaryShot2 ROTSPEED=1 ANGLE=360 SHOT=QuadBlue SPOSX=-100 SPOSY=100 SCALE=2 CENTERX=-100 CENTERY=-100
  </bullet_pattern>
    <system name="RotarySystem"
category="Weapon"
shot_type="QuadGreen"
damage_type="Ballistic"
attack_power="1"
fire_rate="50"
cue_time = "0.5"
range_actual="800"
shots_per_salvo="1"
shot_speed="0"
targeting_logic="Dumbfire"
firing_timing="AllTheTime"
image_name="QuadGreen"
special_bullet_patterns="RotaryPattern"
>
  </system>


Every few rotations it makes 1-5 of the shots counter-rotate. I'm guessing because the shots move past the starting mark in some calculation and then its faster to counter rotate instead of rotate. Regardless changing to 179 degrees fixes it.
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 #43 on: January 23, 2016, 01:25:03 am »
Q: Anyone have an idea on why I can't keep the shots in the following weapon from dying?

Code: [Select]
  <entity name="Rotary" ship_category="LocalGuard_1x1"
    category="Ship"
    display_name="Buzzsaw"
    behavior="LineOfSightAttacker"
    speed="200" acceleration="50"
    max_health="25"
    image_folder="Enemy_Pursuers" image_name="Abmoog1Green"
    time_to_visually_rotate_180_degrees="0.7"
    >
    <hitbox radius="26" />
<system type="RotarySystem" offset="0,0" />
  </entity>

    <system name="RotarySystem"
category="Weapon"
shot_type="QuadGreen"
damage_type="Ballistic"
attack_power="1"
fire_rate="2"
cue_time = "0.5"
range_actual="10"
shots_per_salvo="1"
shot_speed="0"
targeting_logic="Direct"
firing_timing="AllTheTime"
image_name="QuadGreen"
special_bullet_patterns="RotaryPattern"
shots_never_collide_with_terrain="true"
shots_use_performance_sensitive_logic="true"
>
<modifier target="MyShots" type="IgnoresCollisionWithNonWallTerrain"/>
<modifier target="MyShots" type="IgnoresCollisionWithWallTerrain"/>
  </system>


  <bullet_pattern name="RotaryPattern">
  $RotaryShot ROTSPEED=.25 SHOT=QuadBlue SPOSX=-50 SPOSY=50 SCALE=2 CENTERX=115 CENTERY=-100 ROTDIR=-90
$RotaryShot ROTSPEED=.25 SHOT=QuadBlue SPOSX=50 SPOSY=50 SCALE=2 CENTERX=-115 CENTERY=-100 ROTDIR=90
  </bullet_pattern>
  <var name="RotaryShot">
<bullet angle="0" speed="0" shot_type="[SHOT]" rotates_around_firing_entity="true" moves_with_firing_entity="true" spawns_offset_from_firing_entity="[CENTERX],[CENTERY]" never_collides_with_terrain="true" dumbfire="false" is_invisible_and_does_not_collide_with_ships="true">
<spawn>
<bullet_pattern>
$SawToothShot ANGLE=30
$SawToothShot ANGLE=60
$SawToothShot ANGLE=90
$SawToothShot ANGLE=120
$SawToothShot ANGLE=150
$SawToothShot ANGLE=180
$SawToothShot ANGLE=210
$SawToothShot ANGLE=240
$SawToothShot ANGLE=270
$SawToothShot ANGLE=300
$SawToothShot ANGLE=330
$SawToothShot ANGLE=360
</bullet_pattern>
</spawn>
<loop iterations="-1">
<change offset_from_parent="[CENTERX],[CENTERY]" time="0"/>
</loop>
</bullet>
  </var>


<var name="SawToothShot">
<bullet angle="[ANGLE]" speed="0" shot_type="[SHOT]" shots_use_performance_sensitive_logic="true" rotates_around_firing_entity="false" moves_with_firing_entity="true" spawns_offset_from_firing_entity="[SPOSX],[SPOSY]" never_collides_with_terrain="true" dumbfire="true" offset_is_relative_to_parent_bullet_instead_of_firing_entity="true" ShotIsNotStoppedByHitting="true">
<loop iterations="16">
<change offset_from_parent="[SPOSX],[SPOSY]" time="0"/>
<change relative="true" angle="[ROTDIR]" time="[ROTSPEED]"/>
</loop>
            <die />
</bullet>
  </var>

Also, I just saw "angle_from_parent (float), distance_from_parent (float)", which would have made my life much easier.
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 #44 on: January 24, 2016, 01:20:17 am »
Q: Anyone have a good method to combine all of the xml docs into a single searchable offline document that is easily updated?
Q: Are death animations changeable?
Q: Should a modding forum be established?
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.