OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Pooj on 13 May 2005, 20:08:42
-
First of all I will introduce myself, I'm Officer-Cadet van den Heuvel from the Royal Netherlands Military Academy (Army/Infantry). For our Technical Science course me and my fellow Officier Cadets have to make a simulation of a scenario. I will do this digital by using the OFP editor. Now I will come to the point!
I want to script a joint (land,sea and air) attack at a occupied island, it all have to be planned perfect (artillery, amphibious landing, air manoeuvre etc.) I want to do this by using triggers (1). I want to achieve a simulation by using the camera function in the editor (2). After this is all done I have to present this simulation(3).
As you can see I used some numbers (1,2,3), those numbers relay to my questions.
1. Is it a good idea to use triggers for the planning (when which action starts)?
2. Is it possible to monitor the whole battle with the camera function (multiple scenes)?
3. Do I have to use OFP to show this simulation or can I convert it to a video-file (mpg,wmv etc.)
Thanks in advance,
Joop van den Heuvel
-
First of all,
Welcome to the forum!
1. Yes. Triggers will be essential in creating something like this.
2. Yes. If you are not familiar with camera read snYpir's Intro to Camera Scripting and messiah's camera.sqs tutorial. You must read them both in that order. Find them under Tutorials in the Editors Depot. (Link at the top of this page.)
3. Yes but I don't know how.
-
to answer question 3, you'll need a very good video capture program, and unfortunately all of the freeware versions i've tried have been terrible. the quality they give is very poor and filesizes are massive.
i would suggest sidestepping the video capture option, and hook up your pc video card (AV out) to a projector or similar beast. that way you'll get optimum playback performance, depending on your pc.
if you still fancy trying your hand at video capture, read these (http://www.ofpec.com/yabbse/index.php?board=9;action=display;threadid=14178;start=0).
and welcome - you came to the right place ;)
-
It is an option I thought about to link my notebook to a beamer, but we have a nice and stable infrastructure for presentations and linking a notebook to it is an option but can also give some trouble.
I will try the programs described in the topic.
-
For making the scenario a video file, I suggest you use Fraps v2, version1 doesn't record sound.
If the laptop is powerfull enough to run the mission smoothly, connecting that to the projector would be fine, but for large missions, recording the game to a video file on a powerfull computer, compressing the video and running this of the laptop/projector is better idea. Also this will stop anything like the game crashing, as if it records fine, that is what will happen each time you play back the video.
Most recent computers can record Flashpoint smoothly enough, if you have two drives, set Fraps to record to the one without Flashpoint installed, it will increase the smoothness of the recording.
To compress the recorded file (Which can easily be sevral GB), use Virtual Dub (http://virtualdub.sourceforge.net/), then Video > Compression, I normal use DivX to compress it (www.divx.com), or you could use one of the compression-types, most of which should work on most Windows computers. Then save the AVI file, and you can transfer this to the laptop via network or CD/DVD.
Hope this helps
- Ben
-
Thank you it will definetly help, I'm already familiar with compression so that wouldn't be a problem. I'm running OFP on a powerfull desktop (P4 3.2 ghz, 1GB DDR2, Geforce 6800 256 MB) but still have the problem it isn't running really smooth. I have version 1.96 of the GOTY edition. Those anyone know why?
-
I have a machine with a similar spec. When I got it I thought it would be able to handle an 'old' game like OFP easily and I set all the video options in the game to maximum. Not a good idea. My current settings are shown on the attached file.
Now it handles most missions well, but it still becomes very 'laggy' when I am running a large mission and a lot is going on.
Note that if terrain detail is not set to normal it cn do strange things to objects that have been placed inthe mission.
-
It could be because of the used techniques in OFP. When OFP was made the Geforce 6800 or similar videocard weren't out yet, so it wasn't possible to optimize the game for the card. Nowadays you see that games like Far Cry (bit old I know) are optimized for a particular amount of video cards.
But I will search other boards etc. for a patch that will make the performe better.
-
Even thought it is an old game, it is still not possible to buy a retail computer that will be able to cope with the maximum graphics settings. When you have an 8gig chip, and 8gig of RAM, then maybe you can try viewdistance 5000m
Pooj your setup is perfectly adequate. You can play the game on a PII 400Meg - I did for years. Play with the graphics settings a bit. Also don't have more than necessary in your addons folder. Try the Avon Lady's FAQ and the official forums for more tips.
-
Getting a little OT, but never mind. ;D
Hmmmm........I would try and fall back to an older set of drivers for the graphics card, I read somewhere that the newer driver sets were not working to well with the newer cards when it came to OFP.
Can't recall which brand of graphics card it referred to though.
Planck
-
@macguba: You've got a point there, we never reach the maximum, that's true.
@Planck: that is interesting, but as you probably know the Geforce 6800 is a rather new card so old drivers won't help.
-
Nevertheless, I recommend you ask about it on the official forums......Troubleshooting Board.
You may get a more informative answer there.
Edit: At the least do a search there to see if the question has arisen before.
Planck
-
I have some practical questions. I want my attack being planned by time triggers, I found out how I can do this with the camera. To make my question clear I will give a little timeline:
0:00 Artillery fires 0:05 Artillery incoming at target 0:06 tanks attack target etc.
It is just an example, but is the easiest way to do this to Trigger the tanks for presence and let the trigger wait for 0:06 to activate? and what is the best way to this with air units?
-
Timings down to the second don't really work in OFP. Partly because a second in RL is not always a second in the game. Partly because different computers run at slightly different speeds and so even if it works on yours it won't necessarily work on somebody else's.
But mostly because of the sophisticated nature of the game engine. The "random" element is too strong. This makes for fantastic gameplay but it makes camera work a nightmare.
The secret is to use triggers to detect events in the game. Aircraft reaches a certain point, tanks move forward. Certain vehicle disabled, artillery stops firing.
Time based stuff is fine when you are talking about minutes. For exampe, if you wanted 1 minute of artillery fire, followed by 30s of silence, followed by another event, you could use time based triggers for that because it does't matter if the arty fire is 1.02 and the silence 27s.
-
I want to use the camera to show different kinds of attack for example, first you see a tomahawk destroying an airfield, after that you see a artillery strike at a town etc. But it are multiple attacks so I can't link them with events like tank destroyed by artillery go to air strike at bridge or something. But I will try with the timer, if that doesn't work I have to link the events, but that isn't what I'm looking for.
-
You can say when the tank is destroyed goto airfield.
something like this in the camera script
#camloop
blah blah
(camerastuff)
?(alive tank1): goto "camloop"
airstrike camerastuff
hope that helped ::) :P
-
Take a look at messiah's camera.sqs. That (I think) will enable you to move the camera freely while the action is taking place using the a,s,d,w keys. Or, at least, it'll let you get amazing angles.
-
For sequential stuff like artilary firing, then tanks moving up. best way is to use a script like ::
;create explosion at object named logic1
_temp = "Heat105" camcreate getpos logic1
;wait 4 seconds
~4
_temp = "Heat105" camcreate getpos logic2
~5
_temp = "Heat105" camcreate getpos logic3
~3
_temp = "Heat105" camcreate getpos logic4
~10
; allow tanks to move (Set them to no fuel in editor)
tank1 setfuel 1
tank2 setfuel 2
exit
Or, in your tanks waypoint's condition field, put
tankCanMove
And in the script, use
tankCanMove=true
To allow the tanks to follow their waypoints :)
As for the slow down, it's part due to the fact OFP is designed on, and aimed to run on 500mhz etc PCs, not todays PCs, and that, again because OFP is quite old, it's not very efficant with lots of units on screen (The more AI units the computer has to work out what their all doing, the slower it gets).
Put the terrain detail to Normal, this has a big improvement on performance (Anything higher than that really badly slows my computer down), object shadows off, the detail sliders, frame rate sliders at about 3/4.
And depending on the time the mission is, object shadows off will improve performance, but at certain times shadows can make missions looks a lot more impressive, so sometimes putting these on (Vehicle shadows and object shadows) is a good idea..
- Ben