anachronox-sdk/docs/precedents.html

183 lines
9.2 KiB
HTML
Raw Normal View History

2002-01-21 00:00:00 +00:00
<html>
<head>
<title>Precedents</title>
</head>
<body bgcolor="#000000" text="#FFFFFF" font="arial" VLINK="#6666ff" alink="#FF0000">
<FONT FACE="Arial" SIZE="3">
<p>
<font size=7 style="Times New Roman" color=#ff0000>APE / Gameflow Precedents</font>
<p>
This file will explain some of the precendents and rules of thumb for Anachronox.
<p>
<FONT SIZE=4>
<A HREF="#windows">Windows</A> / <A HREF="#worldskills">Worldskills</A> /
<A HREF="#doors">Doors</A> <!-- / <A HREF="#Misc"> Miscellany</A> / -->
</FONT>
<A NAME="windows">
<p><font size="5" color="#FFFF00">Windows</font><BR>
===========================================<BR>
&nbsp;&nbsp;<B>#1 The size and the shape.</B><BR>
===========================================<BR>
All windows, excpet for interfaces and special occasions should have a default of:<BR>
Width 580<BR>
Pos 30,30<BR>
Here is an example of a very basic window with the default font, width, pos, style, background, and formatting that is currently being used at the time of writing.<BR>
<FONT COLOR="#FF5555">
<pre>
#window 555:0101
title "My Pretty Window"
body "This is a window, joy!"
image sendernet/underline.pcx 16,31,548,32
width 580
pos 30,30
font _standardshadow
background color
style "style_embrace"
</pre>
</FONT>
<P>
&nbsp;
<P>
<A NAME="worldskills">
<p><font size="5" color="#FFFF00">World Skills</font><BR>
===========================================<BR>
&nbsp;&nbsp;<B>#1 If you worldskill it open...</B><BR>
===========================================<BR>
After you use worldskill to open anything that has the potential of closing (i.e. most doors), then you should be able to click it open without having to constantly worldskill it. To do this you will need to use the ws_bank and ws_entry commands that
allow you to call a switch at the end of a successful worldskill. Here is an example using picklock.<BR>
In this scenario we are assuming that the sequence (555:0101) is both the Sequence and the Wsequence of the object we are trying to open.<BR>
<FONT COLOR="#FF5555">
<pre>
#switch 555:0101
if (Mapname_door1 == 1)
{
console "target door1" // Here we see if we have been successful yet. If we have, we simply open the door.
return // Stops the worldskill code below from executing.
}
WS_STAND$ = "boots_skill_1"
ws_bank = 555
ws_entry = 0102
ws_difficulty = 3
ws_countertime = 35
gosub 4001:1
return
#switch 555:0102
Mapname_door1 = 1 // Here we set that we are successful. For most purposes the variable you set should be the (Mapname_DoorTargetName)
</pre>
</FONT>
<P>
<B>For most purposes the variable you set should be the (Mapname_WorldSkilledDoor/EntityTargetName).</B> This means if I was writing this code to open a door in Hephaestus and the door's targetname was "pickdoor01", the variable name I would use would
be "Hephaestus_pickdoor1".
<P>
Here is another example using throwloonie<BR>
<FONT COLOR="#FF5555">
<PRE>
#switch 555:0005 // This would be the switch for the actuall door
if (bricksb_looniedoor2 == 1) console "target door1"
else // This would play the "Seems Interesting" message, so people know that the door requires a worldskill to open.
{
timed_message = 36
gosub 1000:1
return
}
#switch 555:0101 // This would be the switch for the throw loonie panel
WS_STAND$ = "stiletto_skill_1"
ws_object$ = "stilettodoor"
ws_bank = 555
ws_entry = 0102
ws_difficulty = 1
ws_countertime = 10
gosub 4006:1
return
#switch 555:0102 // Here is the switch that is called if the worldskill is successful
bricksb_looniedoor2 = 1 // Here we set our success variable so the door can now be clicked open.
</FONT>
=============================================================
Here is a list of other variables associated with worldskills
=============================================================
//=====================================================================
// WORLDSKILL VARIABLES (For All Skills)
//=====================================================================
// All variables except "anox_worldskill_successful" are cleared after mini games.
// Mandatory Variables:
// ws_stand$ = targetname of path corner the character should go to.
// Optional Variables: (Though usually at least ONE of these is needed)
// ws_object$ = the object to target if worldskill was successful.
// ws_bank / ws_entry = the back and entry of the sequence you want to call on success. (i.e. for 59:4001 "ws_bank = 59", ws_entry = "4001")
// ws_getitem = if this value is set to 1, then the character will pickup the object specified in, ws_object$ (requires that ws_object$ is set)
// ws_getitem$ = this can be used if you wish to both target something using ws_object$, and you want to pick up something else. Probably won't be used much, but what the hell...
// ws_ambientname$ = set this to the path/name of an ambient script, and it will play it if the worldskill is successfull. (The ambient will play before the scene.)
// ws_scenename$ = set this to the path/name of a scene script, and it will play it if the worldskill is successfull.
// ws_variable$ = set this to the name a variable that you want set on success. (If "ws_variable" is not set, it will default to 1)
// ws_variable = set this to the value that you want the variable set to on success. (Requires "ws_variable$" to be set.)
// ws_standoverride = Set this to "1" if you do not want the player to use the stand. This a rare condition mostly used where a path_corner isn't convinient like in some Yammer cases and perhaps some Tractor / Throwloonies.
// ws_analyze$ = You can use this instead of a callback to have Rho say a single window of dialog after she wins the Analyze.
// ws_yammer_fail$ = Set this to the dialog you want grumpos to say on a failed Yammer. (There is a default if this is not used.)
// ws_yammer_fail_retort$ = = Set this to the dialog you want grumpos' victim to say on a failed Yammer. (There is a default if this is not used.)
// ws_yammeredname$ = The Window title of the guy you are yammering. (Only needed if you are going to use the Global 50 yammer windows.)
// ws_yammeree$ = the target name of the person you are yammering
// ws_outofway$ = the path corner that you want the victim to go to after they are yammered. (Only set this if you want them to move after)
// ws_yammer1$ = Set this to what you want Grumpos to say when you are successful. (You can ignore this and use a call back if you prefer.)
// ws_yammer2$ = Yammer Window 2 (optional)
// ws_yammer3$ = Yammer Window 3 (optional)
// ws_yammer4$ = Yammer Window 4 (optional)
// ws_yammer5$ = Yammer Window 5 (optional)
// ws_yammer6$ = Yammer Window 6 (optional)
// ws_yammer7$ = Yammer Window 7 (optional)
// ws_yammer8$ = Yammer Window 8 (optional)
// Variables For You: (These are variables the game sets, that you can use for whatever. DO NOT set these variables outside of Global50, unless you know what you are doing.)
// anox_worldskill_successful = set to 1 if the game succeded, set to 0 if it failed.
// ws_skill_level = set to 1 if the level 1 sequence is called, set to 2 if the level 2 is called
// ws_doing_wskill = set to 1 if the worldskill minigame is currently in progress.
// ws_callback_sequence$ = This is just used internally. This is the sequence # to use with the path_corner completion callback. (i.e. 4002:2) If you can find an external use for it, then have at it.
// ws_callback_sequence_a = The bank of the callback sequence, because goto is dumb
// ws_callback_sequence_b = The entry of the callback sequence, because goto is dumb
// ws_called_invalid = This gets set to 1 if you try to use a worldskill with anox_worldskill_active set to 0.
//=====================================================================
</PRE>
For more information see also: <!-- <A HREF="">Worldskill Tutorial</A> -->, <A HREF="#doors">Door Precedents</A>.
<P>
&nbsp;
<P>
<A NAME="doors">
<p><font size="5" color="#FFFF00">Doors</font><BR>
===========================================<BR>
&nbsp;&nbsp;<B>#1 To click or not click...</B><BR>
===========================================<BR>
When should you put a sequence or a wsequence on a door? Here are the basic rules of thumb.<BR>
If it is a large area, such as the bricks, the only doors that should have sequences are doors that you can worldskill. Once again the rule of thumb for such doors would be for them to use the same sequence number for the
sequence and the wsequence. This will allow for the "Seems Interesting" message to be automatically played when you click on them.
<P>
In small areas such as Braintrain, they will need to be brought up on a case by case basis. For example in Braintrain, the doors are clickable and give you a message about where they "go to". This will be the preferred method
for small areas and some few situations where working doors heavily outnumber non working ones.
<P>
For more information see also: <A HREF="#worldskills">Worldskill Precedents</A>.
<P>&nbsp;<P>
</FONT>
</body>
</html>