Personal tools

Wyvern items (code tutorial)

From Whirled

Jump to: navigation, search
Code Tutorial
Create items for Wyvern.
Difficulty Level
Beginner
Requirements
Icon-Programming.png Whirled SDK
Other Information
See also: Simple Wyvern pet (code tutorial)

Contents

Getting Started

Let's learn how to create Wyvern avatars and toys!

Step 1 - Downloads

You'll need to download a few things before we start building our Wyvern Items.

  1. Whirled SDK
  2. Flex SDK
  3. Apache Ant
  4. Java JDK

Step 2 - Unzip

Unzip the files and place them in an easily accessible location, such as a folder on your desktop. You may rename the folders with a shorter name if necessary. Important: Remember the file paths; we will need them later on.

Step 3 - SVN Client

Next, download and install an SVN client, such as Tortoise SVN. This may require you to restart the computer.

Setting Up Environment Variables

Now comes the tricky part!

Step 1 - Getting There

  1. Go to the Control Panel on your computer and click on "System". This may be listed under "System and Maintenance for Windows Vista or Windows 7 users.
  2. Click on "Advanced System Settings". This would be on the left side of the window on Windows Vista /7.
  3. Click Environment Variables at the bottom of the screen. Caution:DO NOT CHANGE USER VARIABLES!

Step 2 - Adding a Variable 1

Add a new System Variable and name it ANT_HOME and make the Variable Value the File Path to the Ant Folder. So if my Ant folder was in the root of the Hard Drive My Value would be C:\Ant_Folder.

Step 3 - Adding a Variable 2

Now make another new System Variable and Name it WHIRLED_HOME and make the Variable Value the file path to the Whirled SDK folder! (To the "whirled" folder you extracted earlier)

Step 4 - Adding a Variable 3

Make one last new System Variable and name it JAVA_HOME and set the Variable Value the File Path to your Java SDK folder! Now find the Path variable and edit it. Now add %ANT_HOME%/bin onto the end of the Variable Value! DO NOT DELETE THE WHOLE VALUE! Save, then click "Ok".

There, Now on to the next bit!

Getting the Source Code

Now after you have downloaded Tortoise SVN, Install it. Once it has been installed (Tortoise may ask you to restart you computer) Open up the folder where you want the Code to be saved, right click on any white space and choose Tortoise SVN then click Repo-Browser! Tortoise will then ask you for a URL. This is where you enter the Wyvern Source Code URL. Just copy and paste the links address. You will then come up with a load of folders. Select all the ones on the right hand side and right click and press Checkout! Now Tortoise will ask you where you want the folders to be saved. Put them anywhere and remember to write down the File Path! Click OK and There you go! Your computer might take a minute or two to load! Once it is finished, Move on to the next part!

Sorting out your Code

Now open up your monster folder that you saved from Tortoise! Open the build.xml file and delete these lines:

    <echo message="Rendering thumbnail..." />
    <exec executable="./thumb.sh">
        <arg value="rsrc/${monster.name}.png" />
        <arg value="Thumb_${monster.name}.png" />
        <arg value="${monster.level}" />
    </exec>

Save your file and close it! Now open the monsters.properties. You will see that there are all the monsters that appear on Wyvern by Aduros. Now what you do is you delete all the names of monsters and add your own such as:

Leviathon.level = 500
Leviathon.sound_attack = Leviathon_attack.mp3
Leviathon.sound_attack = Leviathon_death.mp3

Now make sure that all the pictures and sounds are inside the rsrc folder. So to make the Leviathon I would have to have a picture called Leviathon and it has to be in PNG format and be facing left, A sound called Leviathon_attack which is in the mp3 format and a sound called Leviathon_death which is also a mp3.

Save this and move on to the next part!

Running Ant

Now so Open up Command Prompt (type cmd into run) and direct ant towards your monsters file. To do this you have to write cd then the next folder you want to got to then press enter. Or you can write the whole file path in at once. So I would write cd my documents\wyvern\monster then press enter. After you've got to that type ant into Command Prompt and of it goes! It may ask you where your standalone flash player is and direct it to it. The flash player is normally in the Flex SDK!

Uploading to Whirled

What Ant should of done is convert your files in to a Shock Wave Object and this is what you will be uploading to Whirled!

Different Types

  1. If you upload your monster as a pet It will become a Monster for the game!
  2. If you upload your monster as an avatar It will become an Avatar like my Leviathon one!
  3. If you upload it as a toy then it will become a Tower!

See Also