Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Author Topic: Where's the Documentation  (Read 8590 times)

King_Richard

  • Newbie
  • Posts: 5
Where's the Documentation
« on: December 27, 2016, 12:05:19 am »

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!
Logged

Acetone

  • Hero Member
  • *****
  • Posts: 963
    • Youtube channel
Re: Where's the Documentation
« Reply #1 on: December 27, 2016, 05:12:57 am »

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.
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: Where's the Documentation
« Reply #2 on: December 27, 2016, 09:21:17 am »

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.

Logged

King_Richard

  • Newbie
  • Posts: 5
Re: Where's the Documentation
« Reply #3 on: December 27, 2016, 06:25:45 pm »

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.
Logged

King_Richard

  • Newbie
  • Posts: 5
Re: Where's the Documentation
« Reply #4 on: December 28, 2016, 07:28:30 pm »

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: [Select]
$include("test.js");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: [Select]
// 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;

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?
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: Where's the Documentation
« Reply #5 on: January 01, 2017, 12:46:39 pm »

The include error is a bug (I thought I fixed that one).

But you should definitely be able to set brake value, after all it's a normal JS variable. The problem must be elsewhere ...
Logged