Using Scripts for Dummies Needed!!

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Using Scripts for Dummies Needed!!

Postby bnewton81 » Sat Feb 05, 2011 5:12 pm

My largest question when it comes to using scripts is how do you keep them seperated, or is that like automatic? I've rarely used them in the past, only to make terrain. How do they get stored? It's so hard to know what to ask and how when you know so little about them. I know what they do in many cases, but i hesitate to add them when i know so little about their proper syntax. Like say you have multiple scripts to add to various parts of an age. How do you go about doing this? I just need to know if I'm over complicating matters or not. If it is simple and all i need do is follow some tutorial then by all means reply with it.

Are scripts necessary? Anyway for me to learn this aspect of age writing faster? Link me! Thanks guys.
User avatar
bnewton81
 
Posts: 296
Joined: Sat Aug 28, 2010 3:24 pm
Location: Houston, Texas

Re: Using Scripts for Dummies Needed!!

Postby andylegate » Sat Feb 05, 2011 7:30 pm

Okay, since you are using Blender and the PyPRP plugin, I would recommend that you start here with this link:

http://www.guildofwriters.com/wiki/Gett ... th_Writing

You can think of Age Creation in 3 parts:

Part One: Modeling and Texturing. This is where you spend time in Blender creating your "Scene", making your terrains, floors, walls, everything that people will see. You'll also be creating materials where you use Textures to make these things look good.

Part Two: ALCscripting. This is where you are applying scripting to certain objects so that you can get certain things to happen. You will use this if you want the player to click on something and have something happen. You will use this to have object animate. You will use this to make Wavesets (reflective ripply realistic water). There are many things you will use this for. Instead of trying to learn what every bit of scripting is, it's easier to think of what you want to do, and then go find a tutorial for it.

Part Three: Python Scripting. This will be something you need to use if you want to have Journals or Linking books in your Age. Many puzzles will require you to use Python. Python is not done in Blender, but is done with other tools.

Now you may not do all these things in that order. Obviously you'll need to have some stuff modeled and textured before you can even start think of adding your ALCscripting for anything.

But that link I gave you above will show you how to get started with that.

Now, when you are ready, and you start thinking of what you'd like to do, you can go find a tutorial for it. Like say, you want some sound to happen when the Avatar get's to a certain point. You could use this tutorial here:

http://www.guildofwriters.com/wiki/Adding_Sounds_I

Or you can use my tutorial here on that:

http://dusty.homeunix.net/wiki/Enter_an ... red_Sounds

And of course, if you can't find a tutorial on something, or don't understand it, you can always post questions here.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Using Scripts for Dummies Needed!!

Postby bnewton81 » Sat Feb 05, 2011 9:33 pm

ok, so basically if i want anything more than just floors and walls, I'm gonna need scripts? I guess i am getting a bit ahead of myself. Thanks andy. I've seen your tuts on age building. At least i think you are the Andy that made em. They are very good. Helped me a lot.
User avatar
bnewton81
 
Posts: 296
Joined: Sat Aug 28, 2010 3:24 pm
Location: Houston, Texas

Re: Using Scripts for Dummies Needed!!

Postby andylegate » Sun Feb 06, 2011 6:52 am

Yes that would be me, heh. Just look in my signature and you'll see links to my tutorials.

You can have a lot more than floors and walls. You can have an entire Age with everything in it. But without any of the ALCscripting, it will be "Static", and very quiet with no sounds.

The Uru game engine, Plasma, uses what we call Plasma Components. These "Components" are attached to your objects and are what makes things happen.

Let me explain with something simple: Foot step sounds.

In order to hear the foot steps of a player, you need to create an area, like a box, cylinder, or whatever enclosed shape you need. Like a long box that twists and turns following a stone path you made. This "box" is not going to be rendered by the game engine so the player will never see it. But it's very important as it defines a Region that when the player is in it, something is going to happen.

What we want to happen is have the foot step sounds happen when the avatar is walking around inside that box, and to also make sure it's the sound of foot steps on stone.

In order to do that, we have to tell Plasma that first, this box is a region, and should not be rendered, but instead is used to detect when the avatar is in it.
Then, we tell Plasma what it is that we want to happen when it detects the player in that box, we do that by assigning a "Responder" to that box.
We then tell the Responder what it is that we want to happen.

With Max and Cyan's plugin, you get much more of a feel of how you are attaching these things to an object.

Image

If you look at that picture, you can see the "Components" that are assigned to my "Box" that is my foot step region.

"FootStepRegBasement" is the name of the component that tells Plasma that this is a region and to detect when the player is in it.
"BasementFtStpResp" is the name of the component that tells Plasma what to do when it detects the player in the region, it's a responder, and I've got it selected in the picture. If you look further down, you can see where it says "Foot Surface (metal)", meaning that I want footstep sounds to play while the avatar is in this region, and to make them the sound of foot steps on metal (because he's walking on a metal catwalk).

Now, with Blender and the PyPRP, you are actually going to do the exact same thing! But instead of the nice buttons to click to add these components, you are going to use ALCscripting to do this!

You'll have your screen in Blender split, and on one side, you'll be in what is called the Text Editor. You'll have where your ALCscript goes called up and it is there that you will add the scripting. The scripting is telling the PyPRP plugin what to attach to your objects when you go to export.

So for the footstep sounds, if I was using Blender, I'd have this typed in:

Code: Select all
tunelftstpreg:
   region:
      type: footstep
      surface: metal


Where "tunelftstpreg" is the name of my "Box" that is my region. If you look it makes perfect sense, as below that it says "region:" meaning, Hey, PyPRP, This box is a region! Do not render it, but detect the Avatar.
Then you see "type: footstep", and this is saying, Hey PyPRP, this region is a Foot Step region for the avatar!"
Then you see "surface: metal", and that is saying, Hey PyPRP, I want the foot step sounds to be the sound of foot steps on metal!

So as you can see, you are doing the exact same thing as I'm doing in Max, except you are typing it out is all.

I know it might look very confusing, especially when you start looking at the script for making things Clickables, or the script for making Wavesets, but again, you can always come here and ask questions or help.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Using Scripts for Dummies Needed!!

Postby Chacal » Sun Feb 06, 2011 10:17 am

Tell me if I'm wrong, but the way I see it, an alcscript is not a script at all.
There is no action, unlike a Python script.
It is a set of properties attached to an object. Some properties being objects themselves, with their own properties, etc.
(Or we could call them classes and attributes).
It is used only because there is no GUI in Blender yet for defining such properties.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2515
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Using Scripts for Dummies Needed!!

Postby andylegate » Sun Feb 06, 2011 11:58 am

I think "scripting" is simply because you are having to "write" it out (or type it out heheh). Wikipedia has a bunch of definitions for the word "Script" heheh:

http://en.wikipedia.org/wiki/Script

GUI is a misnomer to me since anything that appears on your computer screen can be a "Graphic", and I am a "User" and I am "Interfacing" with it. Where as in High School, my computer class consisted of using a Teletype with ink and paper that interfaced with a mainframe that used reel to reel tape storage system. So I guess that was more of a PUI (Paper User Interface) ?

I tend to think of Cyan's plugin more as "Point and Click", instead of as "GUI", since I can call up, pick and assign Plasma Components all by pointing and clicking with the mouse.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Using Scripts for Dummies Needed!!

Postby bnewton81 » Sun Feb 06, 2011 10:53 pm

How'd you get ur hands on a 3dsmax 7 copy Andy? I have the newest one i think 11. It is much easier to use than previous releases, but of course cyan's plugins wont work with it.

As I'm beginning to see it, scripting really isn't scripting for anyone but the person who actually made the script. For the rest of us it is copy&pasting/editing =)

BTW Andy, i was in your age Zenphyr Cove and I was experiencing a lot of glitchy flashes. May be my computer, but wanted to let you know. I am on am i5, but with some integrated gpu from intel.
User avatar
bnewton81
 
Posts: 296
Joined: Sat Aug 28, 2010 3:24 pm
Location: Houston, Texas

Re: Using Scripts for Dummies Needed!!

Postby andylegate » Mon Feb 07, 2011 4:47 am

Zephyr Cove glitches and lags on even my computer. That is because I made it badly. It was the 2nd Age I made a long time ago.

Neolbah and Eder Tomahn are examples of Ages I've done recently.

I have 3DS Max 7 and 3DS Max 8. 7 I bought from a friend not too long after Cyan put out their plugin. He had it sitting in a box collecting dust, so I have him 100 dollars for it. Max 8 I got from my friend Jishin. She is not in the Uru Community anymore, and her online comic takes up all of her time, so she gave me her student version of Max 8, along with all it's books.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am


Return to Building

Who is online

Users browsing this forum: Google [Bot] and 6 guests

cron