Scripting for idiots like me

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Scripting for idiots like me

Postby Grogyan » Sat Nov 22, 2008 11:00 pm

I've just finished reading a number of of tutorials that Andylegate has written, and i'm pretty sure he and I are in opposite groups

Anyway I know a little about python now, not nearly as much as Andy, but AlcScript is rather too complex for me to get my head around.

I'll try and build an Age, been a while since I did one and try and have a go with the scripting, I doubt i'll get far

We still need a section on the wiki on AlcScripting for dummies in particular how on earth to tie in Animations with SDL variables
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Scripting for idiots like me

Postby andylegate » Sat Nov 22, 2008 11:04 pm

Dude!!! ROFL!!!!!

Other than a LITTLE bit of scripting I did for maps for FPS games like Call of Duty, I knew NOTHING about Python or ALCscripting until I started Age Creation exactly 1 year ago this month!

I just have a knack for seeing patterns and understanding logic (I LOVE logic puzzles).

In other words: I'm just lucky is all! I have no programing experience.....unless you count BASIC that I learn in highschool back in the early 1980's, hehehehehe.

Thanks for the compliment on my tut's though! :D
"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: Scripting for idiots like me

Postby Grogyan » Sat Nov 22, 2008 11:54 pm

No problem, they're rather excellent.

I did try map building for UT99 but didn't attempt to try coding.
and again for UT2003 still no scripting again

I love math and physics, though i'm not actually good at them

The only prior experience I had at programming was at high school and playing around with QBasic, for loops and sound, very very basic ie for sound i = 1 to 10000 step 1, play sound i freq

I tried learning and will get back to learning C cause i'll be needing that skill to further any studies in robotics

So then I did the stupid and attempt to write a script for Blender in a language I never used which only partly worked, it was very math intensve to understand what i was trying to do, then someone on BlenderArtists did pretty much the same thing but with 1/10 of the code I used.
I'm still no where near an expert on Python, but I somehow got by, now i'm onto Plasma API and AlcScritping, and no idea where to start.
Past Ages I did used templates from other peoples Ages -> mostly what you did or asked, actually Andy, and still not understanding it

I'm just getting myself prepared to do the next Age using rides as subworld animations, and triggering secondary animations and colliders in relation to what the primary animation is set to do
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Scripting for idiots like me

Postby Chacal » Sun Nov 23, 2008 12:27 am

It is normal to learn a new language by copying and tweaking what other people did. That's how I learned several languages (I know, most of them are extinct by now).

Don't see alcscript as a scripting language. See it as a data structure for passing parameters to Pyprp. It is like a simplified form of XML. Don't look for logic in it.

Python is a scripting language. You use it for modifying data and calling library functions that will modify data. For example, you used it in your "curves" project for modifying data in a Blender scene. You will use it in your Ages for modifying data in the Age data structure, and for calling Plasma functions.

So if you're looking for where to start, I'd say first understand the data structure, by looking at prp files through Zrax's excellent PageEditor.
Then understand the Plasma functions by studying the source code for Zrax's libPlasma, and reading posts and tutorials written by Paradox and Hoikas.
Then understand how these are used in Uru, by looking at Python code written by Cyan.
Then experiment!
Chacal


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

Re: Scripting for idiots like me

Postby GPNMilano » Sun Nov 23, 2008 1:51 am

The easiest way to learn alcscripting is just to read some of the examples on the wiki, and then check out pageeditor in libPlasma. That is quite simply the greatest tool for age creation their is, next to PyPRP. I've been using it to tweak so much stuff in my ages, and now have gotten to be able to do what I need to do with PyPRP because I know the names and settings from libPlasma, and can look those up in the prp_matClasses.py for PyPRP, and find out what buttons in blender do what, etc.

Without it I never would have cracked the mysteries of the Particle Emitters, or the GUI's or the SDL Layer Animations.

Just chug along, ask questions when you need, to, and study stuff with pageeditor. once you get the idea of what you want to do, it's fairly simple to look at the three things you'll need. pageeditor for the setting names in plasma, and the python scripts for pyprp to find out the buttons and settings you need to set in blender to make it a reality.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Scripting for idiots like me

Postby Lontahv » Sun Nov 23, 2008 2:41 am

Oh, speaking of particles. I coded them into PyPRP a few months ago. Not sure if that code ever got put in a release or the main SVN since it "didn't work" because I forgot to set a few things (including that CI flag). I'm telling you just so you don't have to rewrite 300+ lines of code again if you want them in PyPRP.
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Scripting for idiots like me

Postby GPNMilano » Sun Nov 23, 2008 3:18 am

Lontahv wrote:Oh, speaking of particles. I coded them into PyPRP a few months ago. Not sure if that code ever got put in a release or the main SVN since it "didn't work" because I forgot to set a few things (including that CI flag). I'm telling you just so you don't have to rewrite 300+ lines of code again if you want them in PyPRP.


I remember reading on the forums that you did this, but since it wasn't mentioned in any release I assumed it wasn't finished yet. I just made mine with libPlasma and PRPExplorer, but if the code is there I'll take a look at implementing it with PyPRP. I want to take a crack at getting some of the MatClasses recoded so the setup offers some more options. I got the ambient color setting working, so people can set the ambient color to their liking. Works great for Lightmaps, but unfortunately, since it uses the mirror color setting, it'll break any age thats exported with it without changing this. (its set to export it as 1 across the board, since there was never any sense in changing this setting in blender before hand) But all you have to do is go through your materials and set the color to your liking, or to black if you want to keep it the way it was.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Scripting for idiots like me

Postby boblishman » Sun Nov 23, 2008 7:12 am

GPNMilano wrote:Without it I never would have cracked the mysteries of the Particle Emitters, or the GUI's or the SDL Layer Animations.


what I don't understand is .... why haven't you shared these things with the rest of us (lesser mortals) ... ? ? ?
when it comes to Age creation ... "DOH" seems to be my middle name...
User avatar
boblishman
 
Posts: 882
Joined: Fri Oct 05, 2007 4:47 pm
Location: Spain

Re: Scripting for idiots like me

Postby Trylon » Sun Nov 23, 2008 9:59 am

I think it's because once you finally finished hacking something together, the last thing you feel up to is writing a step-by step tutorial.
It's a bit because it feels like doing everything all over again.

And it is a bit of a letdown to have done a lot of work figuring something out, only to get told off for not explaining in detail how you did it.

P.S.
Bob, that part about the "lesser mortals" was an unnecessary statement (one close to a snide remark). It implies that you think the one figuring something out is acting like he/she is better than you, just because he/she doesn't feel up to explaining something in detail. Give it a bit of time.
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: Scripting for idiots like me

Postby andylegate » Sun Nov 23, 2008 10:24 am

I tend to post mine right away, while it's fresh in my mind. If I don't I forget things and have to go back and look all over again.

The snowfall tutorial that I wrote up I did wait, but that's because the RAD was taking up all of my time, but I did promise to put it out ASAP, and so I did just a day after the RAD was over with.

That's me however, just like when I found out how to do the animated linking panels, I posted literally within minutes instead of going to bed and waiting for this morning.

I understand what you're saying Trylon, however, if you go back and look over old posts, you'll find in many places where people have stated that they figured out how to do something, but no explination, or that they will do a tutorial later.

And then days go by...weeks......even months and still nothing from them. When asked about it, if they even bother to reply, the answer in many cases is that they are now busy with something else....gets rather frustrating to, YES us "lesser mortals"

"lesser mortals" being those of us that don't know programming, don't know how to hack plasma. However we DO know how to follow step by step instructions, and it even teaches us when we do it that way. I know that when I write my tutorials over at the GoMa, I make them with LOTS of pictures, and never assume that the reader knows how to do something already. If I need them to now how to do something already, I'll state that: "You need to know how to do blahblah before you try this tutorial".
Doing the tutorials also burns into me how these things are done. I can do the snowfall now in my sleep now, with a house full of people and a screaming 2 year old granddaughter just behind me.
"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

Next

Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests