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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-27-2012, 12:23 AM
Smokeynz Smokeynz is offline
Approved Member
 
Join Date: Apr 2011
Posts: 106
Default Scripting methods for mission operation

Method for mission listing within script

Method for Random selection of missions

Method for Triggered missions for Player

Method for Objective mission loading for Player

Firstly I’d like to point out that I am in a learning curve with C# and the methods outlined may be or may not be the best or most efficient way. In many cases I have revised and improved concepts as I go. Secondly much of the core key aspects or syntax is learned from browsing these forums where I have modified for my own purpose or concepts, as such I wanted to return these alternatives I have been working on to the forums. Thirdly got to thank Kodiak for help on the really sticky bits of C# and how they work with CLOD. Finally, this is work in progress, but at a stage where I’d like some feedback on the scripting.

The main purpose of this script is supply a dynamical feel to a mission, by their very nature missions (especially from IL2) have felt scripted and a little sterile. As it happens in my day job I have been developing water management irrigation which simulates rain, the world is chaotic and it in that field applying with chaos changes the reactions more in line with reality. So I am attempting to apply that thought pattern to scripting to simulate a feeling of unknown results. You still have missions, but when they are loaded is unknown.

The second purpose of my methods layout is to make life easier on those who are completely lost with scripting, I am attempting to create scripts which are easy to add missions of users own design, and the script is just an engine that more or less can be just dropped in.
As Kodiak has pointed out in another thread, use of visual express is advisable. It is free for our purpose so why not, it is just a tool to help nothing more.

For the new user of C#, the following layout is setup in blocks of importance (for me anyway), in some cases the order or where the block of script is wrapped is important, but most cases you can place sections just about anywhere and it will still function. Think of the code as lots of small separate scripts talking to each other in a group than a sequential path. (although technically all code is sequential somewhere along the line).

First bit of useful code is to do with C# and visual express
Setting up regions where you can place blocks of scripting makes editing scripts easier. Visual express sees these (CLOD ignores them), so you can hide sections that are not being worked on.

You can use as many as you like

# Region [region title here]

//Script block here

#End region

Ok this shows the regions with title of what is contained, if you click the little (-) or (+) to the left of the screen it opens and closes the regions. Note I also add simple txt separators as well for those who may edit with note pad, the line separators block for visual reference.

This shows the first part of my methods, “Simplified paths”, here I have the main mission path and sub mission paths, and the type is called a “string” with the abbreviated name I called them “MP”, “MPsub” and ” MPtm”. In the core engine we just call MP, MPsub or MPtm as required, but if the user needs to edit the path they only have to edit the main string.

Code:
 /*=========================================*/

    #region Mission paths
        
    string MP = "missions/Multi/Dogfight/ScrimBase/";//simplifying Txt MissionPath
    string MPsub = "missions/Multi/Dogfight/ScrimBase/sub/";//simplifying Txt MissionPath sub missions
    string MPtm = "missions/Multi/Dogfight/ScrimBase/tm/";//simplifying Txt MissionPath triggered missions
    
    #endregion

    /*=========================================*/
Attached Images
File Type: jpg regionspaths.jpg (16.0 KB, 22 views)

Last edited by Smokeynz; 02-27-2012 at 12:59 AM.
Reply With Quote
 


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 06:40 PM.


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