153 lines
7.4 KiB
HTML
153 lines
7.4 KiB
HTML
<HTML>
|
||
<HEAD>
|
||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
|
||
<TITLE>Anachronox Editing Documentation</TITLE>
|
||
</HEAD>
|
||
<BODY BGCOLOR="#000000" TEXT="#EFEFEF" LINK="#00FFFF" ALINK="#FFFFFF" VLINK="#05F3D0">
|
||
<CENTER>
|
||
<P>
|
||
<FONT FACE="Helvetica">
|
||
|
||
<FONT COLOR="#0055DD"><B>Tutorial 36: Battle Scripting</B>
|
||
</FONT>
|
||
</CENTER>
|
||
<P>
|
||
<HR>
|
||
<BR>
|
||
I need to take a break before I tackle this. And you should too, this will take awhile.
|
||
<P>
|
||
Ever played Final fantasy or any other console style RPG?
|
||
<P>
|
||
Anox is just like one of those games. But there are a couple of differences, Mostly that Console Rpgs sell bundles of copies where Anox did Not.
|
||
<P>
|
||
But in those ‘other’ console style games, when a battle takes place, the camera will cut away to an area where all the cameras are prescripted. But NOT with Anox, battles can take place anywhere. The reason Anox can do this is Planet has a ‘relative’ scripting system. Where ANY relative script can change dynamically based off the locations of the attacker & the Attackee. Awesome Stuff.
|
||
<P>
|
||
Lets load up map joey
|
||
<P>
|
||
Click on the ‘draw cyl’ button on the left. Notice the 3 cylinders in the middle of map Joey. The blue cylinder is the attacker cylinder, the red cylinder is the attackee cylinder, the big white cylinder is the area in between.
|
||
<P>
|
||
NOTE: ALL BATTLE AREAS IN ANOX MUST BE CYLINDRICAL IN NATURE.
|
||
<P>
|
||
I put the attacker on path 1 with the focus on path 2. THERE MUST be a focus node AND IT MUST BE OPEN FOCUS.
|
||
<P>
|
||
Drop a 3D node in the middle of the blue cylinder. Have cubic 1 focus at path 2<BR>
|
||
Have the cmd at 0.0<BR>
|
||
Newent=character_pal_com;floor=1
|
||
<P>
|
||
(ALL the main characters switch to a combat model, character_boots_com etc., except democratus. Combat Character models have a whole slew of combat animations)
|
||
<P>
|
||
for cubic 2 drop a 3d node in the red cylinder. This is Pal’s OPEN focus. Drag it out to 1.0.
|
||
<P>
|
||
For cubic 3 drop a 3d node in the red cylinder. This will be the enemy. Have it focus on path 4.<BR>
|
||
Newent=monster_noxgad;floor=1
|
||
<P>
|
||
For cubic 4 drop a 3d node in the blue cylinder. This is the enemy’s OPEN focus. Drag it out to 1.0.
|
||
<P>
|
||
put a camera on cubic track 10 with focus on path 11
|
||
<P>
|
||
all battle scripts began with an OPEN NODE & OPEN FOCUS. You don’t necessarily have to this, it was the style that we wanted. So the first camera would move smoothly to the action and THEN start cutting.
|
||
<P>
|
||
NOTE: In My Opinion, action is better expressed with a moving focus, not necessarily a moving camera. But hey…
|
||
<P>
|
||
You may want to examine all the battle animations Pal has to choose what type of attack you want to do. But lets do something simple, cuz my fingers are getting tired.
|
||
<P>
|
||
On path 6 Place a 3dnode in front of pal with a cmd node<BR>
|
||
Newent=mys_whitephere;floor=0;hidden=1;lighting=0=1=1=1
|
||
<P>
|
||
At 4.0<BR>
|
||
Hidden=0<BR>
|
||
(scale down the sphere)<BR>
|
||
And move the sphere so that it makescontact with the enemy at 5.0 secs. MAKE SURE THERE IS A NODE <B>AT</B> the enemy at exactly 5.0 secs. For reasons which I’ll explain later. BE SURE TO GIVE THIS NODE SOME FORWARD VELOCITY. And then drop another 3d node Past the enemy.
|
||
<P>
|
||
Play the script. It’s not the flashiest…. But lets continue. When the whitesphere hits the target at 5.0 we need to have the monster respond.
|
||
<P>
|
||
So on cubic 3 drop a cmd node at 5.0<BR>
|
||
Soundpain;animonce=26,a,1
|
||
<P>
|
||
This will do 2 things:<BR>
|
||
Play the monster’s hurt sound<BR>
|
||
Play the monster’s hurt animation <BR>
|
||
NOTE: You can play these multiple times if you wish<BR>
|
||
Drop a MASTER COMMAND node at 6.0<BR>
|
||
Displaydamage
|
||
<P>
|
||
This will bring up the amount of damage inflicted. Since we are not in battle mode it will say damage:XXX for now. Only 1 is needed.
|
||
<P>
|
||
This is essentially what a finished battle script looks like.
|
||
<P>
|
||
<B>Assigning relativity.</B> <BR>
|
||
Now we need to make this normal script a relative script.<BR>
|
||
Click on the first button ‘relative mode’<BR>
|
||
A bunch of question marks appear over your nodes. They need to be assigned to cylinders.
|
||
<P>
|
||
Select the only 3D node on cubic 1, Pal’s node. Hit ‘5’. now hit the up arrow. Scroll through all the relative cylinders that you can choose from. The short squat ones are preferred, they do not scale script nodes dependent on height. Choose the short squat cylinder that is in the blue cylinder. <BR>
|
||
Assign the node in cubic 4 to the same node.<BR>
|
||
Assign the nodes in cubic 2 & 3 to the short squat red cylinder.<BR>
|
||
Assign the first node in cubic 6 to the same node. When that path reaches the monster at exactly 5.0, assign that node to the short squat node in the red cylinder.<BR>
|
||
The camera you will have to judge for yourself.
|
||
<P>
|
||
Now hopefully you shouldn’t see ANY QUESTION MARKS. If you do, assign em cylinders.
|
||
<P>
|
||
It’s VERY important that the <B>first and last</B> attacker & attackee nodes be CENTERED IN THEIR CYLINDERS. If not, the characters will skip around in battle mode. To fix this, select the first node in cubic 1 and hit ‘9’. This will Center the node for you. Do the same for cubic 3.
|
||
<P>
|
||
Play the script. It should look exactly the same.
|
||
<P>
|
||
Now lets cycle through some possible battle cylinder scenarios. Cycle through cylinder positions by hitting the [ & ] keys. See how the script changes!<BR>
|
||
You may notice how some nodes may not have gone where you wanted them, so go back to your original cylinder configuration and re assign those nodes.
|
||
<P>
|
||
Configure the cylinders so that they are right next to each other. Play the script. Notice that the white sphere goes backward and hits PAL (THIS HAPPENS IF YOU GAVE THE NODE AT 5.0 SOME VELOCITY). Try to adjust so that it looks decent. Now change to the far spaced cylinder configuration. Play the script. This is why battle scripting can be difficult, YOU MUST MAKE SURE THAT YOUR SCRIPT WORKS AT <B>ANY</B> CONFIGURATION. The reason why you dropped a node exactly at 5.0 ON the monster is so that it is in sync with the soundpains and Hit animations for the monster at 5.0.
|
||
<P>
|
||
Here are some RULES that MUST be Followed
|
||
<P>
|
||
<B>RULES:</B><BR>
|
||
<B>ALWAYS return model to FLOOR=1</B><BR>
|
||
If you ever pick up an attacker OR attackee using floor=0, you must return it to floor=1
|
||
<P>
|
||
<B>ALWAYS return models to the CENTER of the cylinder</B><BR>
|
||
If you ever MOVE an attacker or attackee, you MUST return them to the center of their appropriate cylinder
|
||
<P>
|
||
<B>EVERY NODE MUST have a relativity</B>
|
||
<P>
|
||
<B>PLAY every script in all cylinder nodes</B>
|
||
<P>
|
||
<B>CAMERA should RARELY go out side the big cylinder.<BR></B>
|
||
If you don’t the camera can go out of world in some battles
|
||
<P>
|
||
<B>ALWAYS return FLASHSTYLE to ‘0’</B>
|
||
<P>
|
||
<B>ALWAYS RETURN FLASH VALUES to 00000000</B><BR>
|
||
Any flash effects you try, just be sure to return them all to zero by the end of it.
|
||
<P>
|
||
You are almost done with your battle script
|
||
<P>
|
||
Replace the cmd with ‘newent=character_pal_com;’<BR>
|
||
RELENT=SOURCE,1,2;<BR>
|
||
The attacker
|
||
<P>
|
||
Replace the cmd with ‘newent=monster_noxgad;’<BR>
|
||
RELENT=TARGET,1,4;<BR>
|
||
The attackee
|
||
<P>
|
||
When you play this script you wont see the attacker or attackee models.
|
||
<P>
|
||
So use these commands<BR>
|
||
A3_relsource<BR>
|
||
A3_reltarget<BR>
|
||
To assign temporary models, You can also see how the cylinders will change.<BR>
|
||
Cylinder sizes are determined by Bounding boxes.
|
||
<P>
|
||
A3_relsource character_pal_com<BR>
|
||
A3_reltarget monster_noxgad
|
||
<P>
|
||
Now play the script
|
||
<P>
|
||
You are done with a battle script.
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<P> <P>
|
||
</BODY>
|
||
</HTML>
|