View unanswered posts | View active topics It is currently Sun Oct 13, 2019 8:28 pm



Reply to topic  [ 1 post ] 
 Position Plot App 
Author Message
User avatar

Joined: Tue Aug 14, 2007 12:51 am
Posts: 5084
Location: Portugal (Yes, Europe)
Post Position Plot App
This is a very interesting app that was released a few years ago in http://www.annihilation.info forums and I am now posting it here for more people to enjoy it.

C-- wrote:
Released.

http://roma.annihilation.info/TribesBMP.zip
Many features, enjoy.

lol

I will make some serverside Tribes code to make the logs and release it soon.

BTW, Nofix, how do you fetch positions from recordings?


and then

C-- wrote:
Tribes code to export position logs:

$SpeedLimit = 0;
$frequency = 6;

Code:
function logplayers()
{
for(%x = Client::getFirst(); %x != -1; %x = Client::getNext(%x))
   if(gamebase::getposition(%x) != "0 0 0" && gamebase::getteam(%x) >= 0)
       {
   %team = client::getteam(%x);
   %pos = gamebase::getposition(%x);
   %pos2D = make2d(%pos);
   $EPP[%team] = %pos2D;
   if(vector::getdistance("0 0 0", item::getvelocity(%x)) > $speedlimit) export("EPP" @ %team, "Config\\poslogs.cs", true);
   }
schedule("logplayers();", 1/$frequency);
}

function make2d(%pos)
{
return floor(getword(%pos, 0)) @ " " @ floor(getword(%pos, 1));
}


I just made it serverside and recoded most of it, so if its not working or there is no export, tell me.

Paste this script in some .cs file in some folder where you can exec("the above script.cs"); from.


As a server, you launch this code by calling "logplayers();" when the mission starts, manually or put it in a function like game::initialmissiondrop() in game.cs. Make sure the file is executed before you use that code.

After that the function schedules itself so it will call itself in 1/$frequency seconds.
You can modify frequency and speedbarrier variables in the code to customize what you wanna see in the result.
The loop stops when the scheduler is deleted when the mission ends.

It exports automatically to Config\\poslogs.cs. make sure that file didnt exist because this function will just add more stuff over it.

Some technical stuff:
It exports variables $EPP[0] and $EPP[1] where 0 and 1 are beagle and dsword teams, the values are 2d coords of players on the map. It appends the latest variables to the files without removing the last records, so you have some example .cs files in TribesBMP.zip you can see how it looks.
The prog I wrote when I was a lil noob reads the stuff and draws the image with minimum customization options (like colors zoom etc). There are apparently hotkeys there which i forgot.


Rollercoaster:

Image

A Safe Warm Place

Image

Broadside:

Image


Tribes ART :)

_________________
Image
http://www.annihilation.info/anubis/
http://www.tribeshavoc.com/anubis/


Wed Oct 31, 2012 2:14 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.041s | 21 Queries | GZIP : On ]