Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 09-28-2011, 07:07 AM
klem's Avatar
klem klem is offline
Approved Member
 
Join Date: Nov 2007
Posts: 1,653
Default Scripts Collection Discussions

Ataros,
just a word of thanks for setting up the Scripts Collection and thanks to Blackdog for Stickying it.

Also thanks to the guys that you have linked to, there's some really useful stuff there and its now easy to find. Perhaps they can be persuaded to put their contributions into the Collections sticky.

Perhaps this thread can be stickied for discussion to keep the Collections thread clean.
__________________
klem
56 Squadron RAF "Firebirds"
http://firebirds.2ndtaf.org.uk/



ASUS Sabertooth X58 /i7 950 @ 4GHz / 6Gb DDR3 1600 CAS8 / EVGA GTX570 GPU 1.28Gb superclocked / Crucial 128Gb SSD SATA III 6Gb/s, 355Mb-215Mb Read-Write / 850W PSU
Windows 7 64 bit Home Premium / Samsung 22" 226BW @ 1680 x 1050 / TrackIR4 with TrackIR5 software / Saitek X52 Pro & Rudders
Reply With Quote
  #2  
Old 09-28-2011, 08:19 PM
Blackdog_kt Blackdog_kt is offline
Approved Member
 
Join Date: Jan 2008
Posts: 2,715
Default

Thread is now sticky.

Use this thread to discuss the scripts. Use the other sticky thread (http://forum.1cpublishing.eu/showthread.php?t=26523) ONLY as a directory/repository for scripts.

This division is due to user requests in order to maintain a clean, easy to browse download directory while also having a separate thread (this one) for specific issues.

If you want to download a script go there http://forum.1cpublishing.eu/showthread.php?t=26523 , if you want to talk about it stay in this thread

I will be trying to keep things tidy but Ataros, klem, TheEnlightenedFlorist, etc (aka the people in the community who are doing all this work for the rest of us) are also welcome to request the occasional clean-up or moving of posts if they think it's necessary and i missed it.
Reply With Quote
  #3  
Old 09-29-2011, 12:02 PM
dflion dflion is offline
Approved Member
 
Join Date: Nov 2007
Posts: 319
Cool Need some Script help? DFLion

//$reference Campaign.dll
//-$debug
using System;
using maddox.game;
using maddox.game.world;
using System.Collections.Generic;
using System.Diagnostics; // for Stopwatch timer


public class Mission : maddox.game.campaign.Mission {

public override void OnBattleStarted() {
base.OnBattleStarted();
}

public override void OnTrigger(int missionNumber, string shortName, bool active) {
if ("trigger01".Equals(shortName) && active) {

AiAction action = GamePlay.gpGetAction(ActorName.Full(missionNumber, "KG1_Ju88_01"));
if (action != null)
action.Do();
action = GamePlay.gpGetAction(ActorName.Full(missionNumber, "KG1_Ju88_02"));
if(action != null)
action.Do();


GamePlay.gpGetTrigger(shortName).Enable = false;
}
}

public override bool IsMissionListener(int missionNumber) {
return true;
}


private void checkLanded(AiAircraft aircraft) {
if (GamePlay.gpPlayer().Place() != aircraft)
return;
GamePlay.gpHUDLogCenter("Press Esc to end mission.");
}

public override void OnAircraftLanded(int missionNumber, string shortName, AiAircraft aircraft) {
checkLanded(aircraft);
}

public override void OnAircraftCrashLanded(int missionNumber, string shortName, AiAircraft aircraft) {
checkLanded(aircraft);
}

}

Thanks again Ataros and Blackdog kt, don't get me wrong, I think the scripting has got a lot of future potential for the Sim.
After hours and hours creating the campaign, you are confronted with the scripting to make everything work? (Sigh) with no official information. (I think what we are doing now is creating this official information - trial and error)
I created the above generic (for all missions) scripting for my 'KG1.III Ju88 Campaign'. Sometimes it works, sometimes it doesn't?
Here is each mission with its objective - help?

1. 26th Jun 1940 'Montdidier' -training mission
2. 27th Jun 1940 'Transfer to Rosieres-en-Santerre' - positioning/training flight
3. 2nd Jul 1940 'Caen-Carpiquet' - positioning flight
4. 2nd Jul 1940 'Minelaying' - night first combat mission
5. 3rd Jul 1940 'Ford' - night pattern bombing mission
6. 13th Jul 1940 'We bomb Portsmouth' - day pattern bombing mission
7. 25th Jul 1940 'Convoy Attack' - day dive bombing mission
8. 28th Jul 1940 'The Thames Estuary' - day pattern bombing mission
9. 4th Aug 1940 'Uphavon' -night pattern bombing mission
10. 12th Aug 1940 'Ventor' - day dive bombing mission
11. 30th Aug 1940 'We bomb Biggin Hill' day pattern bombing mission
12. 7th Sep 1940 'The London Docks' day pattern bombing mission

With the above info, I need some brilliant scripter to create a script for each mission, with success and failure scripts. The Ju88 unit flying in the Campaign is the Stab Staffel of KG1.III. Later on, after 'the learning curve' I can put some more interesting triggers in each campaign mission.
All these missions are based on actual combat reports from various Ju88 units - semi-historical. I have really enjoyed flying the Ju88 in the campaign, it certainly was one of Germany's best aicraft in WWII. I have produced a pilot's notes to help everybody get 'up and running' in the campaign.

DFLion

Last edited by dflion; 09-29-2011 at 12:11 PM.
Reply With Quote
  #4  
Old 09-30-2011, 09:19 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

@ DFLion
I think if you would have started a new thread you would have a better response because this thread is meant for the collection discussion

Then the information you provided definitely is not enough for scripters. You have to tell them exactly what you want the script to do step by step. And it should be one universal script for all missions (otherwise it would take to much time), thus success criteria must be the same.

E.g. you can place a group of vehicles at each target (maybe several groups - need testing). Then you place a trigger in FMB with big enough radius to include these groups. The type of trigger sounds like "vehicles in the area destroyed by 60%".

Then you place second trigger in each mission on an airfield where the player must land. The trigger type is "group pass through". (If he took off from the same airfield, it would be a bit complicated, as he would pass the area twice. You have to tell a scripter about this.)

When you did all this you tell a scripter how your triggers are named and ask to write a simple script that checks that both triggers are active by the end of the mission when a player lands and loads the next mission or the same one in case one of the triggers is not active.
Then maybe someone gives you a script for mission No.1 and you will need just to copy it and change filenames in it to be suitable for mission No.2, etc.

Then you can ask for more functionality like finish the mission if player is landed in a different place or is killed or time has run out, but you have to be very specific and go one step at a time from a simple script to a more functional.

You would not get help if you are not specific enough or you do not know what you want to do in details. You can start a new thread and copy this information to it if you agree with this approach.
Reply With Quote
  #5  
Old 10-01-2011, 01:25 AM
dflion dflion is offline
Approved Member
 
Join Date: Nov 2007
Posts: 319
Smile Pointing me in the right direction

Thanks again Ataros,
I will start compiling some trigger information for each campaign mission and post a new thread with all the info as you suggested. Apologies for posting my thread in the wrong place - working late at night on the laptop.
Most of the mission target areas have got vehicles in them, I will have to increase their radius slightly. I will try and make 'one universal script' for each mission as you suggested with success criteria the same.
Will start working on it shortly.
DFLion
Reply With Quote
  #6  
Old 10-01-2011, 08:02 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

np, mate! I am sure you will issue a great campaign which many players will enjoy. Glad to help.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:52 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.