Anteworld - Outerra Game > JavaScript development

Where's the Documentation

(1/2) > >>

I've been browsing through the forums for information and have found some relative info, read through the wiki and found some things useful. Most of the information that I've come across is aimed towards importing models and handling their physics. My long term interest with Outerra lies in AI, a subject that I have recently become interested in.

What I am looking for is a detailed list of functions, the best example off the top of my head would be something similar to ARMA's scripting command site. Is such documentation available for Outerra?

Some quick things that come to mind:
  * spawn a vehicle through script
  * draw a graphic at "x" coordinates
  * get distance to nearest road
  * find all objects within "x" vicinity

Looking at far TitanIM is, I suspect there's great deal of documentation somewhere that I have missed.

At last, I am impressed with how far Outerra has come and I am optimistic of it's future!

There is an api aviable, but I'm not sure if the devs wants it to be fully public (they shared it with several modders).

Based on what others modders have made, several of the things you want are already possible:

  * spawn a vehicle through script : yep, but scripts can only be activated when you are in a vehicle. For example in the (not yet released) Langdon multiplayer, a radio tower is used as a standard menu to connect to a server and directly spawn/enter vehicles, as seen in this video :

  * draw a graphic at "x" coordinates : check SteelRat's videos, like this one :

 * get distance to nearest road : there is a function to get distance from any point or object.

* find all objects within "x" vicinity : not sure about this one.

We haven't released the internal documentation, mainly because some of it is too low-level (primarily C++ API on which Titan build their own scripting interfaces), and because it's still changing (or is planned to change soon), as we learn what's best from real usage feedback in Titan.

Also for the Anteworld game the scripting interface will be likely different from that of OT/Titan, as we took a different approach with the networking and associated stuff.

Thanks Acetone & cameni, I'll be sure to check out the videos.

I surely don't want to get too deep into the code so I will tinker with what I can find in the meantime and await for future updates & documentation.

Do we mind if I ask scripting questions in this thread than? Or shall I open a new thread?

Either way I'll put these out there: (if ya'all want a separate thread I will transfer pertaining info over to the new)

--- Code: ---$include("test.js");
--- End code ---
throws an invalid path for me, I've tried including the full path as well as multiple shorthand versions all of which have failed,
attempted from the t817 from a custom script defined in the objdef file

I have read through a few threads that popped up in my search where they report success I report failure... I assumed if it's in the local directory than it wouldn't need a full path and if it's a separate folder than it'd need the Outerra path else if lied outside of the game path it'd need the entire path.

Onto my next dilemma, controlling vehicle inputs

--- Code: ---// where this is used
brake += parking;
brake *= BF;

// I am unable to directly control or manipulate the brake variable and the parking variable, for example
brake = 1;

// instead I must use
if ( I_WantToBrake )
  slowDown = 1;
} else
     slowDown = 0;
brake += slowDown;
brake *= BF * slowDown;
--- End code ---

Which is all fine, however, if I would like my AI script to be modular where I am able to tie into any ground vehicle, air vehicle, or humanoid with relatively little modification to original code. It appears that the "keyboard inputs" are protected within the script, or just my simple interpretation of it atm. Should I instead focus directly manipulating the inputs at a higher level?


[0] Message Index

[#] Next page

Go to full version