Members | Sign In
All Forums > Mission Scripting
avatar

Two questions, new to making missions - monsters and stations

posted Dec 18, 2012 00:37:57 by TravisHead
So I'm loving the mission editing ability in Artemis but I had a couple of questions I haven't been able to figure out on my own;
1) Can Monsters move? I have tried all sorts of combinations to get a monster to move from A to B but they never budge. So far I've had to fake it out by having it jump every few seconds. This does what I need but a smooth movement would be preferred and I'm running into issues with scripting the reaction when Artemis engages them (so far they just ignore and move as scripted).

2) Can you make an object intangible? I wanted a star base that looks planet-bound so I created an asteroid in the same space and learned how to move it up and down on the Y axis. It actually looks pretty cool. Problem is with an asteroid there I can never dock with the station, it seems like the asteroid is blocking the ship from getting close enough.
Is there a way to make the asteroid just a picture? I want to be able to fly right through it if need be but will settle for being able to dock.
page   1 2 next last
17 replies
avatar
pangolin321 said Dec 18, 2012 19:14:42
For the monster, you could try creating an indestructible NPC ship next to the monster. The monster should aggro on to the npc ship. Then, simply command the ship to move where you want the monster to go, and the monster should follow. If you make the ship dissapear when an enemy comes close, and reappear when no enemies are around, it should aggro like normal. It might also be possible to create a custom enemy ship that uses the same mesh as the monster. Tweak the stats until its similar enough. Then you can just script it like any normal ship.

If you want to continue with your method of having it teleport, you can fix it by using if statements for the warping, such as "if the distance from the artemis is less than x, then teleport". Try and get x to be close to the normal aggro range for the space monster.

As for the asteroid, I'm not sure, but you might be able to place a custom mesh object, using the mesh of the asteroid. This way it will look like an asteroid, but the game wont treat it as one.
[Last edited Dec 18, 2012 19:15:28]
avatar
TravisHead said Dec 18, 2012 20:39:49
Thanks for the reply.
I hadn't considered the ship idea... That would work but I would probably prefer to do a ship that looks like a monster as I am trying to do a custom scenario so a ship would break the immersion (I am reproducing TNG's Encounter at FarPoint).
Thanks for the idea.

The asteroid idea I HAD considered as I saw this in another mission (Party Crashers) but from the code I wasn't able to figure out how to duplicate the results. This would fit the bill perfectly as I could have a station with the skin of an asteroid, much like the 'Secret Ship' in PC.

So I guess my problem is the same - how do I create an object with properties of X but skin of Y? I don't want to tinker with properties outside of the Mission folder but having played Party Crashers I *KNOW* this is not required to make it work.
Any help would be appreciated.
avatar
bleep751 said Dec 18, 2012 23:56:11
you could try this -
Vesseldata xml
-
<vessel uniqueID="1011" side="1" classname="AsteroidBase" broadType="AsteroidBase">
<art meshfile="dat/asteroid.dxs" diffuseFile="dat/asteroidTexture.png" scale="0.24" glowFile="dat/stationA_tower_illum.png" specularFile="dat/stationA_tower_specular.png"/>
<shields front="2000" back="0" />
</vessel>


your mission-
<create type="station" raceKeys="friendly" hullKeys="AsteroidBase" x="99600" y=0" z="99600" name="Asteroid Base" />
avatar
TravisHead said Dec 19, 2012 02:11:29
Thanks!
So if I understand this;
<vessel uniqueID="1011"
side="1" (allegiance?)
classname="AsteroidBase" broadType="AsteroidBase"> (custom object name)
<art meshfile="dat/asteroid.dxs" (dxs? handy to know how to reference the other game files but what does asteroid.dxs supply?)
diffuseFile="dat/asteroidTexture.png" (setting the skin, thanks)
scale="0.24" (size)
glowFile="dat/stationA_tower_illum.png"specularFile="dat/stationA_tower_specular.png"/> (not sure what these two are, just images so aesthetic I would assume)
<shields front="2000" back="0" /> (straightforward)
</vessel>
<create type="station" raceKeys="friendly" hullKeys="AsteroidBase" x="99600" y=0" z="99600" name="Asteroid Base" /> (placing it in the game)

Ok, so the only things I really don't understand from this is what the Tower PNG's are for if they are just images, and will this give the "asteroid base" the ability to dock, like a station?
Also this would imply modifying the vesseldata.xml for anyone I give this mission to, correct? Is it possible to embed this vesseldata into the Mission folder?
Thanks again for the help.
T
avatar
TravisHead said Dec 19, 2012 02:44:06
Alright, so I figured out some of this on my own. I now get what the PNG's are doing, and it acts like a station because the "side=1" from vesseldata.
Handy.
I adjusted the scale to 0.1 - I found any bigger and the ship would get pulled "into" the asteroid when you dock.
(for anyone else just learning - you need to restart the server if you modify the vesseldata file)

My question about embedding the station details into the Mission folder stand. I want to be able to just give people the folder and they can run with it. I realize the vesseldata change is simple but it's just something I want to avoid if possible.

Haven't had the chance to test the monster ideas yet but with what I have learned from you two I will see if I can't make a "ship" that looks like a monster and a basic station that looks like a asteroid all within the mission itself.
Thanks!
avatar
bleep751 said Dec 19, 2012 02:49:54
Hey..DXS file is what gives it the shape of an asteroid, its the 3D model that the skin is put on top of. So if you were to change that, to say, mine.dxs, the object would have the shape of a mine, but the skin of an asteroid....Regarding the glowFile and specularFile..well, to be honest, you probably won't need those, and can remove them. Sorry, I was just distracted and forgot to take them out. But yeah, this should make an asteroid that you can dock with, like a station. If you take out the glow and specular, should be

<vessel uniqueID="1011" side="1" classname="AsteroidBase" broadType="AsteroidBase">
<art meshfile="dat/asteroid.dxs" diffuseFile="dat/asteroidTexture.png" scale="0.24"/>
<shields front="2000" back="0" />
</vessel>
avatar
bleep751 said Dec 19, 2012 03:09:10
I don't believe there is a way to embed it into the mission folder, though, only way I know of is through the vesseldata
avatar
Mike_Substelny said Dec 20, 2012 03:54:09
Travis, you CAN make monsters move. Just add to object property X +1 and the monster will move one meter in the X direction. Use a combination of those to make it move. You can use this to make it wander or move toward a fixed point, but it will not chase a moving point like a player ship. To get it to chase a player ship you would need a LOT of code, accounting for numerous positions of the monster and the players.

Another way to get a monster to chase players is to constrain the monster to a generic object (constantly copy object property X,Z of the generic to the monster). Then tell the generic object to move toward the player at whatever speed you like. This will work fine, but Science will scan the generic object so it won't look like a regular monster. Give it a clever name and unique map icon color.

You cannot put any vessel data files in the mission folder at present. I expect it in a future upgrade. But I have a workaround for your asteroid base:

Build a normal base. Call it "Asteroid Base." Set it's shields to 2000.

Build a generic object on top of the base. Give it the asteroid DXS and texture files. Set pushRadius to zero and artscale to be slightly larger than the base. You might need to move it one meter on any axis to assure that it doesn't repel the base. For added realism you can give the generic object a pitchDelta, rollDelta, and angleDelta so your asteroid base appears to be slowly turning in space.

You could even have the base defend itself by putting a neutral destroyer inside the base with its engines disabled. just remember that Science will see that there is a USFP Destroyer inside the asteroid base.

For more ideas, look at the way we used generic objects in the mission "Party Crashers."
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
TravisHead said Dec 26, 2012 01:40:10
Thanks, Mike.
I actually did use the Party Crashers code to try and figure it out initially but couldn't make it work. Dropping the push radius to 0 still didn't allow me to dock but I will revisit and play with it a bit more to see if I can't make it work.

The solution I have for the monsters is similar to what you suggested - I have them starting on the edge of the system and then "jump" to a preset point in the direction I want. I added several hops to make it look more natural but this appears to be about as close as I can get it so far.
Might tinker with the "X+1" idea if I have time but building missions is eating up far more hours than I expected.

Anyway I'll see how I make out and maybe let you guys know if I get it to work. Thanks again for all the help.
T
avatar
Mike_Substelny said Dec 26, 2012 06:41:51
My advice is to concentrate on your story. I expect some new techniques that will allow better special effects in an upcoming Artemis update.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
TravisHead said Jan 02, 2013 00:13:48
It's Done!
Thanks for all of the help.

I went with the 0 push radius asteroid "inside" the station, and then added a tilt to the station to make it unique and it turned out rather well.

This was for my recreation of FarPoint Station. I made a mission inspired by that first episode of Star Trek TNG. Had to take some liberties (added Ferengi enemies to give tactical something to do) and there are 4 ways to "win" so I left it fairly open to how the captain decides to approach the situation.
Anyone familiar with the story might have an idea of what to expect.
:)

Itching to get a crew together now and let them run through it. See how it gets received.

Thanks again all.
Will let you know if I need any help with my next mission (planning the Enterprise's first contact with the Borg).
Travis
avatar
JSpaced said Jan 16, 2013 14:04:43
Any chance I could take a look at your "Encounter at Farpoint" mission script please?
J
"We should give him the send-off he deserves. He died saving us all. Prepare a Rocket-Shed for immediate launch."
avatar
Mike_Substelny said Jan 16, 2013 17:16:13
The new 1.70 release has made mission scripts much more powerful. I expect you could do something really cool with Farpoint now.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
TravisHead said Jan 16, 2013 23:06:07
I haven't looked at it in the new version yet but can send it as-is.
I don't have permission to edit the wiki page, is there a standard FTP or upload location common among Artemis users?

Once I get some time I will review it in 1.7 but that may not be until some time next week.
T.
avatar
JSpaced said Jan 20, 2013 19:00:26
@Mike, is there a new reference for 1.70 or are you referring to the ability to enter forumlae in place of integers?
"We should give him the send-off he deserves. He died saving us all. Prepare a Rocket-Shed for immediate launch."
Login below to reply: