Members | Sign In
All Forums > Mission Scripting
avatar

Mission Script earthquake!

posted Jan 09, 2012 16:04:08 by ThomRobertson
I've just released V1.60, and this version really shakes up mission scripting, for two reasons.

---1---
I've changed the vesselData.XML file quite a bit, in order to make it more flexible for modders and for the future. But there's a lot of connection between scripts and the vesselData.XML file.

I've made it easier for a scriptor to put just about any hull onto any type of ship, but while I kept the "hulltype" attribute (so you can specify a hull by it's unique number) I recommend you create ships with the "raceKeys" and "hullKeys" attributes instead. This will help future-proof and mod-proof your scripts.

---2---
I changed the AI. Now enemies and neutrals have an AI stack filled with AI blocks. You scriptors can use "clear_ai" to remove the default blocks from a ship, and "add_ai" to add blocks. The most major change you'll see right away is that the old command "direct" is deprecated in favor of the POINT_THROTTLE and DIR_THROTTLE AI blocks.


Since these are such major changes, I'm certain I didn't get everything right, and I welcome all of your feedback about how to fix/improve these new systems.
Creator of Artemis
page   1
4 replies
avatar
Vorus said Jan 09, 2012 19:12:42
This looks outstanding. It's going to be a lot of work getting old missions to the new standard, and re-doing modded VesselDatas, but you've got a great system in place for the future, I think. I really like the fact that you can list more than one raceKey and hullKey, good idea. But I do have a couple questions.

1) Is there a maximum number of keys that can be listed? Like can I do: raceKey="Torgoth Klingon enemy" so that people using stock will see a Torgoth, ItB will get a Kling, and anyone else gets a 'safety' generic enemy?

2) If the script does fall back to the 'safety' Key, will it always pick the same ship? That is, if someone is playing with a really different VesselData, and all they ever get are the keys "enemy" and "medium" will they always get the first ship that meets those criteria, (Which would be the equivalent of a Kralien BB, right?) or is there any randomness?

3) The new *_THROTTLE commands; can genericMeshes use them?
-----------
Khomerex nal Khesterex

The unofficial Artemis Wiki, your best source for Artemis Information
avatar
ThomRobertson said Jan 09, 2012 20:17:14
1) Is there a maximum number of keys that can be listed? Like can I do: raceKey="Torgoth Klingon enemy" so that people using stock will see a Torgoth, ItB will get a Kling, and anyone else gets a 'safety' generic enemy?


Yes, exactly. The string has an internal limit, but it should be way to big to worry about.

will it always pick the same ship?

There is randomness, if there's more than one hull that "wins" the comparison match of the raceKeys and hullKeys.

The new *_THROTTLE commands

are not commands, but AI Blocks. Currently the AI works only for enemies and neutrals, but my intent is to give the new AI to every other object I can, soon.
Creator of Artemis
avatar
Vorus said Jan 10, 2012 01:14:43
Excellent, excellent. If I wore a hat, and knew how to doff it, I'd doff my hat to you. :D
-----------
Khomerex nal Khesterex

The unofficial Artemis Wiki, your best source for Artemis Information
avatar
Mike_Substelny said Jan 10, 2012 15:41:07
While our old mission scripts won't work, Artemis 1.6 ships with several working mission scripts written by Thom and one written by me. You should study them.

I wrote the 1.6 version of "Havoc in the Hamak Sector" with an incomplete understanding of the add_ai blocks. The AI does work, but the one line of ATTACK is coded incorrectly. I will post a correctly coded version to my website.

I'm planning to develop a selection of AI stacks for various purposes to share with the community. I'll post them as soon as I have mastered the new add_ai blocks.
"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).
Login below to reply: