Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
Xavier Wise

Registered:
Posts: 1,141
Reply with quote  #1 
In the scripts I write, I use sector transitions. They work simply by using the "destroy all" command to clear nebulae, asteroids and mines. However, if there are enemies or allies in the system (including bases) I have to define a name for each, and then write a destroy command for each of them when 'leaving' the sector.

I would be extremely useful and more efficient if there was a destroy command that I could use that destroyed all objects defined as bases, neutrals and enemies.

Currently, we have:
<destroy_near type="asteroids" radius="70800" centerX="50000" centerY="0" centerZ="50000" />
<destroy_near type="all" radius="70800" centerX="50000" centerY="0" centerZ="50000" />


The only way to remove enemies, bases and neutrals is to specify exactly which ones to remove using:
<destroy name="D-10" />

Hence why each enemy created in the script must be defined with a name in the create command, and the corresponding destroy command also added to the script.

It would be great if we could have something like this:
<destroy_near type="neutral" radius="70800" centerX="50000" centerY="0" centerZ="50000" />
<destroy_near type="enemy" radius="70800" centerX="50000" centerY="0" centerZ="50000" />
<destroy_near type="base" radius="70800" centerX="50000" centerY="0" centerZ="50000" />
<destroy_near type="named objects" radius="70800" centerX="50000" centerY="0" centerZ="50000" />

That way, the game could randomly generate the names and we could just define the type of ship to create. When the ship then 'moves' from one sector to the next, a single destroy command could be used to clear out the named objects, the same way a single command is used to clear unnamed objects.

For my own scripts, it would mean I could strip out massive amounts of code, and will even make it easier to have random enemies spawn in at particular points. 

__________________
Fleet Captain Xavier Wise - TSN Sabre
Link to TSN RP Community website
ryleyra

Registered:
Posts: 3,007
Reply with quote  #2 
I have to agree, plus as noted in another thread, it might be helpful to be able to specify whether a given destroyed object should be counted for the final score or not. If you're traversing sectors, you don't want to have to see all the bases that were destroyed and recreated at the end.
Xavier Wise

Registered:
Posts: 1,141
Reply with quote  #3 
I will have to double check, but I don't think they are counted. I was flying around the TSN Sandbox on patrol mode, and the stats at the end matched only those ships that had been destroyed in the game through things like mine impacts. The ones destroyed using a command in the mission script were not counted.
__________________
Fleet Captain Xavier Wise - TSN Sabre
Link to TSN RP Community website
Voice

Registered:
Posts: 42
Reply with quote  #4 
That would still make it a good idea to include a parameter to control whether it is counted.  Think of a mission where you have to complete certain tasks to destroy something, rather than just blow it up with nukes.  It would be good for a script-destroyed object to be counted if it were the purpose of the mission.
DizzyKungFu

Registered:
Posts: 94
Reply with quote  #5 
I just ran into this problem, and it's still around in 2.7.2! So seconding everything Xavier said (quite succinctly, I might add).

Has anyone discovered a work-around?
Darrin

Registered:
Posts: 165
Reply with quote  #6 
Quote:
Originally Posted by DizzyKungFu

Has anyone discovered a work-around?


Nope. I was coding a multiple-sector mission where a pirate brigantine launches fighters, and each fighter is given a random name "n##" where "n" is a letter followed by a number. In order to destroy/create a new sector, you have to know what the fighter names will be... so I wound up just listing every possible fighter name "A01" through "Z99" (2600 destroy lines). It was annoying.

I am also annoyed that drones/torpedoes don't get destroyed either, and they aren't named objects. The torpedoes eventually disappear, but not the drones. 




Xavier Wise

Registered:
Posts: 1,141
Reply with quote  #7 
There is a segment of code that I created in the TSN Sandbox and posted on the forums (or at least I think I did) that will destroy all named objects with a random name. I managed to get a decent balance between the speed that things were removed and the amount of code required.

There is still the problem with removing drones however as they don't 'burn out'. I think I once requested a timer be added so drones eventually did run out of steam (currently they have infinite range and will keep going indefinitely). Torpedoes aren't as bad as they burn out after a set period of time.

__________________
Fleet Captain Xavier Wise - TSN Sabre
Link to TSN RP Community website
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 2,404
Reply with quote  #8 
My guess is that this will never be fixed in Artemis 2.x.x.

Thom has said that Artemis 3.0 will have an unlimited universe so sector transitions won't be necessary.

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
notsabbat

Avatar / Picture

Registered:
Posts: 1,297
Reply with quote  #9 
Quote:
Originally Posted by Mike Substelny
My guess is that this will never be fixed in Artemis 2.x.x.

Thom has said that Artemis 3.0 will have an unlimited universe so sector transitions won't be necessary.



Mind.
Blown.

__________________
-Captain of the TSN Gungnir JN-001
-Eastern Front online group member
-My continuing bridge build:
http://artemis.forumchitchat.com/post/immersion-bridge-build-in-progress-7335195?pid=1290158413
Darrin

Registered:
Posts: 165
Reply with quote  #10 
Quote:
Originally Posted by Mike Substelny

Thom has said that Artemis 3.0 will have an unlimited universe so sector transitions won't be necessary.


...and I suspect I will attempt to add them anyway.


Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 2,404
Reply with quote  #11 
Quote:
Originally Posted by Darrin


...and I suspect I will attempt to add them anyway.




There will still be reasons to spontaneously destroy and create maps in a script. For example, if you want your players to have an adventure in a "mirror" universe, or inside a gigantic space station or dragon's nest, or even just to create a special visual effect. Even more likely, you might have a Game Mastered sandbox script that can create several different predefined universes.

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.