Jump to content

Suggestions and help on mission rotator development


Recommended Posts

Public testing opened!

Anyone that wants may now step into the =RvE=Dedicated server

in Hyperlobby and have a go at an early full length campaign! :)

 

Mission selection is dynamic!

 

Many of you will not like it, because the flights are long, and it is far from the classic team deathmatch / air quake usually found in HL.

 

 

 

 

 

Short introduction

AMRACT is a mission rotator software for lomac 1.12a that times and adapts mission rotation depending on given objectives being completed or not.

 

The program is in beta stage, and now has a console interface with instructions for the user.

 

Current version WITH USER INTERFACE(console!) is : AMRACT BETA 0.65b

Instructions are found in the documentation below, some are also presented to you when you launch the program.'

 

 

 

Documentation (holds for all 0.6x) :

http://www.f.kth.se/~kjolhede/AMRACT.pdf

 

 

 

AMRACT Server Stats module

As it turns out, adding a server stats module to the program at this stage wont take more than an hour. So my question is, what format do you want to have the server stats saved in?

My thoughts are to have it saved just in text.

 

For example the detection would be for kills/killed. Then is the issue if crashes should be counted as deaths or not. I think in the beginning they will not.

{BeginEvent}

date and missiontime

Player1

plane

kill/kill vehicle/kill ship

plane/type

name

{EndEvent}

_____

maybe just a list of these?

 

 

 

Status Update

==========

We have run a 5 mission campaign using the tool and it worked great :)

Successfully tested kill vehicle/kill/and defensive missions for rotation!

V 0.63 documentation posted - Includes user instructions!

Welcome messages implemented.

v 0.65 released, solved a few crashes and implements some of the 0.7 features: status updates on objectives and time left every 1/6 of the mission time!

Note: versions previous to 0.65 are directly unstable, and might crash randomly ^^

v 0.65b released, solved a bug where it sometimes did not load the correct objectives.

 

// Yoda

  • Like 1

S = SPARSE(m,n) abbreviates SPARSE([],[],[],m,n,0). This generates the ultimate sparse matrix, an m-by-n all zero matrix. - Matlab help on 'sparse'

Link to comment
Share on other sites

Are you sure the lockon window has focus? You might try explicitly using FindWindow/SetForegroundWindow.

 

"As you point out, SendKeys doesn't work with every key. To send Ctrl+Pause,

use the SendInput user32.dll function or the keybd_event function."

http://www.thescripts.com/forum/thread457373.html

 

 

Good luck -- sounds like a cool project.

LP

 

modules:

F5-E / A4-E / A-10A / AJS-37 / SA-342 / UH-1H / Ka-50 / Mi-8 / CA

 

would buy:

OH-58 /AH-64A / AH-1 / Sepecat Jaguar / F-111

Link to comment
Share on other sites

I am trying a different approach right now with DXinput....grr it is getting complicated. I am trying to get sendInput to work, but something is not right....

I have written a test program, but it wont work =/. Maybe can you see what I've done wrong?

 

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers

#include <stdio.h>

#include <tchar.h>

#define _WIN32_WINNT 0x0500

#include "Windows.h"

#include <stdlib.h>

#include <iostream>

#include <stdarg.h>

 

#include "dinput.h"

 

 

int main()

{

INPUT inp[2];

memset(inp,0,sizeof(INPUT));

inp[0].type = INPUT_KEYBOARD;

inp[0].ki.dwFlags = KEYEVENTF_SCANCODE;

inp[1] = inp[0];

inp[1].ki.dwFlags |= KEYEVENTF_KEYUP; // keyup event

 

inp[0].ki.wScan = inp[1].ki.wScan = DIK_Q; // inp[0] = keydown, inp[1] = keyup

SendInput(2, inp, sizeof(INPUT));

inp[0].ki.wScan = inp[1].ki.wScan = DIK_1;

SendInput(2, inp, sizeof(INPUT));

return 0;

}

 

 

EDIT: I got it running, forgot to import the .lib (doh), now to the issue of lockon.....Moment of truth....will it respond to escape? =)

S = SPARSE(m,n) abbreviates SPARSE([],[],[],m,n,0). This generates the ultimate sparse matrix, an m-by-n all zero matrix. - Matlab help on 'sparse'

Link to comment
Share on other sites

EDIT2 : After 12 hours still unable to get combinations keys of to work (example ctrl+m). I'm about to give up here. The sad thing is that I have an objective based mission rotator almost ready, and the input is the only thing that is missing. If anyone feels like giving a hand it would really be appreciated.

 

EDIT3 : Solved :). Sitting at msdn developers forums for a while proved useful!

S = SPARSE(m,n) abbreviates SPARSE([],[],[],m,n,0). This generates the ultimate sparse matrix, an m-by-n all zero matrix. - Matlab help on 'sparse'

Link to comment
Share on other sites

I'm soon going to have to start making a list of all the people who have helped me.

Using MS DirectX SDK was really the key though, without that I would have stumbling in the dark.

S = SPARSE(m,n) abbreviates SPARSE([],[],[],m,n,0). This generates the ultimate sparse matrix, an m-by-n all zero matrix. - Matlab help on 'sparse'

Link to comment
Share on other sites

I've split the program up in a way that easily allows me to replace modules or add new features if needed.

So for the first version it only gets information from the mp_log, parses that, compares to given objective events (loaded at the start of the program), and adds to certain counters if conditions are met. (like kill ship ... or kill 50 BLUE fighters)

 

The mission switcher currently only supports files in the main mission folder, but because of the program design it is only a matter of putting a new algorithm for my "missionChangeKeySequence" - wow that was a long class-name :), and sending mission file search path.

S = SPARSE(m,n) abbreviates SPARSE([],[],[],m,n,0). This generates the ultimate sparse matrix, an m-by-n all zero matrix. - Matlab help on 'sparse'

Link to comment
Share on other sites

I AM green.

 

I started c++ 1,5 mths ago with a beginners course at my UNI (I FAILED that course)

 

But I am VERY stubborn.

  • Like 2

S = SPARSE(m,n) abbreviates SPARSE([],[],[],m,n,0). This generates the ultimate sparse matrix, an m-by-n all zero matrix. - Matlab help on 'sparse'

Link to comment
Share on other sites

ok now I have moved from gcc to VC++ 2005 to ease DirectX implementations, and everything compiles and runs... 2000 lines of code = yuk.

 

Anyway Now I actually need to connect the input module to the output module :) for the first input+output tests in lockon!

S = SPARSE(m,n) abbreviates SPARSE([],[],[],m,n,0). This generates the ultimate sparse matrix, an m-by-n all zero matrix. - Matlab help on 'sparse'

Link to comment
Share on other sites

I hereby declare........no just kidding :)

 

The program right now is in some form of alpha stage, with some parts that still are not implemented. Early tests seems to show that the following gray area is finished and works well.

 

I have a test version of (Main) so far that does, sort of, what the real one+GUI will do in the final version.

 

I'm just about to do some ingame test with AMRACT 0.1 ;)

If there is any interest, although the program does not really do anything for normal users so far, I put the source code here . You'll find some other files in different folders there as well.

kind of a lot to go through though, 1300-1400 lines

 

EDIT: I have just successfully tested the program on a very simple situation.

Given a "kill one specific type unit"-objective on one side, it detected this event and rotated the mission accordingly.

 

Now it's time to start to work on GUI I guess....bway.

 

OR I leave it to someone else :)

as usual, new source zip uploaded also

S = SPARSE(m,n) abbreviates SPARSE([],[],[],m,n,0). This generates the ultimate sparse matrix, an m-by-n all zero matrix. - Matlab help on 'sparse'

Link to comment
Share on other sites

Early results :

 

Picture 1

Picture 2

dev2cs0.th.jpg

WOHO

 

I must say it is working out better than expected :)

 

 

This was the objective file I gave the program:

 


{5}
00/00:00:00 BLUE "player"(<jet>) kill vehicle RED "BTR-70" by muffins

Note that kill events are source team insensitive in my program, meaning that even if RED kills RED here, it counts as objective completed (just like at least I want it to )

 

If you want something else I can add a type :

specific kill

to force it to check that the correct team kills (feels pointless ;))

 

RIght now I have kill types:

kill

kill vehicle

kill ship

 

You could have other objective types of course also..like land ;)

S = SPARSE(m,n) abbreviates SPARSE([],[],[],m,n,0). This generates the ultimate sparse matrix, an m-by-n all zero matrix. - Matlab help on 'sparse'

Link to comment
Share on other sites

I think it's worth waiting for it ;) We plan to bring back =RvE=Dedicated server (courtesy of Yoda :)) with that tool rotating missions upon objectives accomplishment- a sort of a semi-pseudo-dynamic campaign that will have a storyline and many possible scenarios. A lot of work in mission design and planning ahead of us and then internal testing but we're on it. We hope it will work out.

"See, to me that's a stupid instrument. It tells what your angle of attack is. If you don't know you shouldn't be flying." - Chuck Yeager, from the back seat of F-15D at age 89.

=RvE=

Link to comment
Share on other sites

Well right now i don't have time to implement the user interface. Maybe sometime next week or so, unless someone else wants to do it.

S = SPARSE(m,n) abbreviates SPARSE([],[],[],m,n,0). This generates the ultimate sparse matrix, an m-by-n all zero matrix. - Matlab help on 'sparse'

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...