Overgrowth Scripting Mods

A secret forum for people who preorder Overgrowth!
zalo
Posts: 56
Joined: Tue Jul 06, 2010 11:22 pm

Overgrowth Scripting Mods

Post by zalo » Thu Nov 11, 2010 1:35 am

I just took a look at the scripting behind Overgrowth, and it's so simple. It's just like Java or Actionscript. Here's what I did in 5 minutes:


Why don't I see more scripting mods around these parts?

User avatar
Endoperez
Posts: 5668
Joined: Sun Jan 11, 2009 7:41 am
Location: cold and dark and lovely Finland

Re: Overgrowth Scripting Mods

Post by Endoperez » Thu Nov 11, 2010 2:29 am

I've been wondering about the same thing. There's lots of people here, but it seems like there are only very few scripters, programmers, drawers and 3d modelers.

A long, long time ago I did a few simple scripts to try out custom animations. Flips, flapping arms + flying, climbing animation that I activated manually before climbing up a steep surface etc.




Is your flying done by removing the counter from jump? Holding space -> up? I don't remember how I did my version, it's been such a long time. It probably didn't take much longer than yours. A real climbing code that'd automatically do stuff would be much more complex - have you looked at the ledge climbing code yet? ledgeup.as or something? After seeing that, I felt that whatever I had been doing was just silly magic tricks and now got a glimpse of real magic. :D


Also, there are a few limits to the scripting that might not be apparent at first glance. It's not documented, for one, so you need to find an example of how to do something before you can do it. That will come in time, and obviously it'd be silly to write a documentation when things can still change a lot.
Secondly, some things are done in the game-code, so we can't script it. More stuff will be added in time, as they start working on different parts of gameplay mechanics.
Thirdly, we can't tell if something is unimplemented as of yet, or just undocumented. :lol:

I haven't gone through all the new code yet, but I don't think it's possible to add a new object through code, or to have an existing game-world object as a variable. So you can't summon anything, can't create temporary things, can't shoot or throw anything, etc. Also, you can't change objects, so you can't have doors opening or traps being sprung or rabbit statues coming alive. However, we just got access to particles, which can be used to do some of those things. Rabbits breathing fire, here we come! :D

zalo
Posts: 56
Joined: Tue Jul 06, 2010 11:22 pm

Re: Overgrowth Scripting Mods

Post by zalo » Thu Nov 11, 2010 2:48 am

Actually, the flying was already in there, just very subtle. I modified a few variables so the "moving around in the air" effect was more pronounced, and since there was a mysterious "Jump_Fuel" variable, I decided to give that a couple extra zeros as well. The running speed was another variable. What you didn't see in my vid. was the slight modification to the AI guy's routine (enemycontrol.as) which contains all the AI for the guy.

Also, I agree with the lack of Documentation being annoying.

zalo
Posts: 56
Joined: Tue Jul 06, 2010 11:22 pm

Re: Overgrowth Scripting Mods

Post by zalo » Thu Nov 11, 2010 3:24 am

Argh, I couldn't get that firebreathing rabbits thing out of my head.


I used this in the .as:

Code: Select all

	MakeParticle("Data/Particles/fire.xml",this_mo.position+vec3(0,0.8,0),this_mo.GetFacing()*30);
And this as my fire:

Code: Select all

<?xml version="1.0" ?>
<particle>
    <textures color_map = "Data/Textures/smoke.tga" 
              normal_map = "Data/Textures/smoke_normal.tga"
              shader = "litsprite"
              soft_shader = "litspritesoft"/>
    <size min = "0.2" max = "5"/>
    <color red =   "1.0"
           green = "0"
           blue =  "0"
           alpha_min = "0.1" alpha_max = "5"/>
    <behavior inertia="0.95" gravity="-4.0" wind="0" size_decay_rate="0.0" opacity_decay_rate="0.0"/>
    <quadratic_expansion speed="2.0"/>
    <quadratic_dispersion persistence="0.5"/>
</particle>

User avatar
Endoperez
Posts: 5668
Joined: Sun Jan 11, 2009 7:41 am
Location: cold and dark and lovely Finland

Re: Overgrowth Scripting Mods

Post by Endoperez » Thu Nov 11, 2010 5:55 am

zalo wrote:Argh, I couldn't get that firebreathing rabbits thing out of my head.

I used this in the .as:

Code: Select all

	MakeParticle("Data/Particles/fire.xml",this_mo.position+vec3(0,0.8,0),this_mo.GetFacing()*30);
I haven't had time to look at the particle interface yet. Which .as does that line go to? I assume it's aschar.as, since this_mo seems to mean a rabbit in this case.



The fire would have to be somewhat more orange, possibly modulating between red and yellow hues if that's possible. Having a gradient from white to dark red to orange to 10-30% transparent gray (smoke) would be better, but a adjusting the color by e.g. sin curves would probably be easier, and even that might still be impossible for modders.
Experimenting with different shaders could also help a lot, but I don't understand anything beyond the very simple stuff.

Marcus
Posts: 201
Joined: Wed Nov 03, 2010 10:35 am
Location: Denmark

Re: Overgrowth Scripting Mods

Post by Marcus » Thu Nov 11, 2010 9:09 am

Never thought of scripting Overgrowth yet, but I will for sure mess around with it now. This is endless fun.

pantokraator
Posts: 5
Joined: Tue Jun 22, 2010 12:26 pm

Re: Overgrowth Scripting Mods

Post by pantokraator » Sat Nov 20, 2010 2:47 pm

I used to script Mount&Blade a lot. Currently downloading the latest alpha, I'll see what I can do.. :)

User avatar
Silverfish
Posts: 1451
Joined: Sun Oct 26, 2008 8:24 pm
Location: Sweden
Contact:

Re: Overgrowth Scripting Mods

Post by Silverfish » Sat Nov 20, 2010 3:13 pm

That's some really cool stuff zalo!
I'd really like to get into scripting for OG, but then I remember that my programming skills are quite limited and then I become sad. :(

And then I go into the script files and change numbers on random to see what happens in the game and then I become less sad.

If someone wants to make a mod some day I'll probably join to make models/animations/textures since that's what I can do.

I'd like to see more of this stuff!

User avatar
key2van
Posts: 130
Joined: Wed Mar 24, 2010 8:35 pm
Location: Canada

Re: Overgrowth Scripting Mods

Post by key2van » Sat Nov 20, 2010 4:36 pm

The takeoff for Robbert look so damn cool. It reminded me of a hero springing into action. Awesome mod. I've been making super saiyan wolves recently using textures and particle effects, and would love to use them with a mod like this. Wolf Ball Z :wink:
Attachments
wajeeenjeeenjeeenjeeen (the noise of super saiyan mode)
wajeeenjeeenjeeenjeeen (the noise of super saiyan mode)

User avatar
Silverfish
Posts: 1451
Joined: Sun Oct 26, 2008 8:24 pm
Location: Sweden
Contact:

Re: Overgrowth Scripting Mods

Post by Silverfish » Sun Nov 21, 2010 3:09 am

Woah ss wolves! Awesome! xD
This engine would probably make a pretty great DBZ mod platform when it's out! ^^

User avatar
key2van
Posts: 130
Joined: Wed Mar 24, 2010 8:35 pm
Location: Canada

Re: Overgrowth Scripting Mods

Post by key2van » Sun Nov 21, 2010 1:13 pm

Hey zalo, can i have the code try out the scripting mod? I really want to put in dragon ball z sounds and use it with the SS wolf alongside flying animations.

zalo
Posts: 56
Joined: Tue Jul 06, 2010 11:22 pm

Re: Overgrowth Scripting Mods

Post by zalo » Sun Nov 21, 2010 1:38 pm

lol, there are no flying animations.

I just went into aircontrols.as and upped the Jump_fuel and air_control and jump_vel variables.

Apparently, the Wolfire team made jumping with this kind of expandability in mind. :)

EDIT: Oh, in aschar.as I upped the float_run_speed as well.

User avatar
key2van
Posts: 130
Joined: Wed Mar 24, 2010 8:35 pm
Location: Canada

Re: Overgrowth Scripting Mods

Post by key2van » Sun Nov 21, 2010 1:45 pm

LOL, i know that there aren't any flying animations, i meant i would like to try this mod out alongside my flying animations. But thanks for the instructions, I am going to try this out soon.

User avatar
key2van
Posts: 130
Joined: Wed Mar 24, 2010 8:35 pm
Location: Canada

Re: Overgrowth Scripting Mods

Post by key2van » Sun Nov 21, 2010 4:40 pm

I've been playing around with the scripts and I'm slowly getting better results, but one issue i have is with particles. I don't really know how to explain it properly, but is there any way to make the particles "refresh" as fast as the character runs or jumps? I'm not very good with programming as it was my least favourite course, so help would be greatly appreciated. :mrgreen:
Attachments
It seems that the particles are not moving as fast as the character
It seems that the particles are not moving as fast as the character

User avatar
Count Roland
Posts: 2937
Joined: Tue Sep 25, 2007 11:15 pm
Location: Galapagos Islands, rodeoin some turtles.
Contact:

Re: Overgrowth Scripting Mods

Post by Count Roland » Sun Nov 21, 2010 6:42 pm

Every time I see "ss wolves" I think they're Nazis.

Post Reply