Graviteam
April 26, 2024, 08:23:42 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1] 2 3
  Print  
Author Topic: Beginning work on a SFK42 Campaign/Mission Editor.  (Read 29866 times)
0 Members and 1 Guest are viewing this topic.
minimi66
Major
****
Posts: 62


« on: December 02, 2012, 06:01:14 PM »

Hello to all,

I have just returned from two weeks away working on a ship in the Indian Ocean, in my many hours of time off i have been getting to grips with campaign and mission editing in SFK42.  I have to say that it really is a pretty tortuous process in several areas and does not seem user friendly at all.  Yes, there is a lot you can do with the stock mission editor but there seems to be a lot you can't do as well?  You have to be prepared to delve into the several script and text files within the SFK42 folders and learn how and where they are linked in order to do pretty simple and essential things such as:

Name a campaign
Give a mission a name other than some cryptic mission editor one like tiger-mod001-stu etc etc
Add your own historic text briefing
Add your own historic map
Add your own Mission text briefing
Add icons to the mission briefing map
Add messages to in-mission waypoints
Add new in-mission orders to the player tank
Add your own start of mission video
Add your own loading screen background
etc etc etc!

Yes all the above can be done and i have managed to learn slowly how to accomplish these tasks over the last two weeks but i have to say it was not easy and took a lot of trial and error and some reverse engineering of existing missions and campaigns.  The script files are the key and understanding them and their inter-relationship is the only way i can see to accomplish the above tasks.

Therefore i have decided to begin work on a new Windows Campaign/Mission Editor application for SFK42. 

I will be using MS Visual Studio 2010 to create an application that will provide a player with a GUI that will edit the following SFK42 system files in order to initially achieve the tasks i mentioned above:

brief_text.text
mis_text.text
[your mission name].text
camp_list.engcfg
[your campaign name].engcfg
[your mission name]_loc_data.text
[your mission name]_scripts.engscr
[your mission name]_zones.engcfg

The application will be designed to work in tandem with the existing mission editor and NOT to replace it.  Although i have programming knowledge and experience it does not currently extend to incorporating mapping type linkages and other more complex routines.  Maybe in time and in cooperation with members of the community this will be possible in the future and thus create a one-stop shop for SFK42 editing?

I cannot give any timeline for this project as yet as i am just starting out but i will of course be keeping the community informed of the progress and asking for advice and assistance from any members who can contribute.

I hope this application will be welcomed by the community and will be supported in its development.  The application will be freeware and i am not asking for any financial support in its production.  If anyone has specific requests on what they would like to see included in the functionality of the application (within reason!!) then please leave them in this thread.

Look forward to hearing your comments and keeping you all updated.

Stu
Logged
frinik
Generalfeldmarschall
*****
Posts: 3145


« Reply #1 on: December 02, 2012, 06:13:38 PM »

Wow Minimi66( a fan of Austin Powers? Wink! That's absolutely fantastic what oyu are planning.Much appreciated and frankly a tall undertaking.

The only request I have is unrealistic an dit would an instant mission or battle generator for SF .I remeber a guy was planning one and posted on the Tanksim.com SUBSIM forum about it but then he disappeared from the map and nothing has been heard since.

Well whatever help we can provide you can count on ! Smiley
Logged
lockie
Generalfeldmarschall
*****
Posts: 2348



« Reply #2 on: December 02, 2012, 06:20:06 PM »

Give a mission a name other than some cryptic mission editor one like tiger-mod001-stu etc etc
Add your own historic text briefing
Add your own historic map
Add your own Mission text briefing
Add icons to the mission briefing map
Add messages to in-mission waypoints
Add new in-mission orders to the player tank
Add your own start of mission video
Add your own loading screen background
It's sounds a bit fantastic Smiley
But let me be your guest?
Logged

Provocative signature removed
minimi66
Major
****
Posts: 62


« Reply #3 on: December 02, 2012, 08:24:46 PM »

Thanks for the encouraging comments guys, as stated i am at the very beginning of this project so have no idea of what problems may lie ahead and what methods i will have to try to produce an intuitive and user-friendly app but i will do my best.  I don't think its too much of a tall order as all we are really talking about is a simple GUI that allows the accessing, editing and saving of those simple text files i listed in the original post.  This is not exactly cutting edge programming or even using Visual Studio to anywhere near its massive capability.

Basically the GUI will simplify the process of locating the right script file and inputting the information you want or editing existing values etc.  It will cut out the need to deal directly with the script files and if it turns out the way i want then a change made to one of the files will automatically and invisibly be reflected in any of the other files that refer to that particular value or text string etc.  This last part will most likely be where a lot of the difficulty will lie.

As for an Instant Mission/Battle Generator if doubt whether something like that is currently within my knowledge level but maybe in time with cooperation from other players with some programming experience then who knows.  I certainly agree with you frinik that it would be a fantastic feature for the game and one that would extend its lifetime enormously! Realistically though i suspect that it might require access to the game source code and also the mission editor code as well as things like randomly plotting realistic and workable waypoints and orders for AI units would be really quite complicated without access to the source code?  But who knows?  Lets see how far i/we get with this stage and then take a look at what else might be achievable?

Thanks again for the encouragement guys and i'll keep posting as work continues.   Smiley

And yes frinik, BIG Austin Powers fan mate!!  Grin Grin Grin

Logged
lockie
Generalfeldmarschall
*****
Posts: 2348



« Reply #4 on: December 02, 2012, 08:33:34 PM »

God Bless your work!
Logged

Provocative signature removed
frinik
Generalfeldmarschall
*****
Posts: 3145


« Reply #5 on: December 03, 2012, 02:16:57 AM »

Well Minimi66 be the "The Spy that Shagged M.E.( Mission Editor) .... Grin
Logged
Kyth
Generalfeldmarschall
*****
Posts: 2044


« Reply #6 on: December 03, 2012, 06:33:04 AM »

Give a mission a name other than some cryptic mission editor one like tiger-mod001-stu etc etc
Add your own historic text briefing
Add your own historic map
Add your own Mission text briefing
Add icons to the mission briefing map
Add messages to in-mission waypoints
Add new in-mission orders to the player tank
Add your own start of mission video
Add your own loading screen background

Hi Minimi,

Sounds promising, good luck!

The items in red above are actually created outside of the editor. You might want to start with them first. Once the image / video files are residing in their folders, you could create a simple utility to select them for the mission entry,
Logged

"What am I, chopped liver..?"

"Yes."
Kyth
Generalfeldmarschall
*****
Posts: 2044


« Reply #7 on: December 03, 2012, 06:49:51 AM »

As for an Instant Mission/Battle Generator if doubt whether something like that is currently within my knowledge level but maybe in time with cooperation from other players with some programming experience then who knows.  I certainly agree with you frinik that it would be a fantastic feature for the game and one that would extend its lifetime enormously! Realistically though i suspect that it might require access to the game source code and also the mission editor code as well as things like randomly plotting realistic and workable waypoints and orders for AI units would be really quite complicated without access to the source code?  But who knows?  Lets see how far i/we get with this stage and then take a look at what else might be achievable?


One approach would be to pre-set a database of deployment areas and movement paths for each map.
These are laid out on each map using "contours". Perhaps more than one set of contours could be pre-defined, allowing for some unpredictability.
They could be pre-defined for assault / defense, pursuit / rearguard and meeting engagements. The wonderful thing about these "contours" is that they can be defined and stored in text files.

Then, the next thing would be to allow small, medium and large size battles, but that's another story for another day Grin
Logged

"What am I, chopped liver..?"

"Yes."
minimi66
Major
****
Posts: 62


« Reply #8 on: December 03, 2012, 07:18:06 AM »

Hi Kyth,

Thanks for your input above and your advice on the external objects that exist outside of the stock editor-created files. Your idea on the mission generator with presets is also very interesting and indeed has got me thinking that something along those lines could be achievable.....in time!  Smiley

I started work last night on an initial basic GUI that can append or add a new word within a specific line of a .text file such as adding a user created name for a mission that would appear in the Campaigns and Missions menu in the game. At this stage I'm playing with a combination of text boxes and buttons to input your mission/campaign name and hit the button to modify the relevant .text file.

Will be doing more work later today and I'm still actually working out which programming language is the best to use, Visual Basic or C#.

I am thinking of setting the GUI out as a tabbed form with different tabs for different editing functions such as one for editing Campaign details, one for adding briefings etc etc.

As I mentioned earlier i'll be starting "easy" and going from there! I've been scoping out many of the excellent Visual Studio forums and developer networks this morning and it appears so far that there shouldn't be too many major problems in trying to do this. It's just a matter of finding the right recipe to cook the meal right!

As promised I'll keep everyone posted and as soon as I have some screenies I'll put them up on here ok.

Stu  Smiley
Logged
Kyth
Generalfeldmarschall
*****
Posts: 2044


« Reply #9 on: December 03, 2012, 03:08:30 PM »


About adding a mission briefing and other things, I remember a particularly long discussion in one of the threads.
If I recall correctly, it didn't do much good.  Cheesy

Anyway there's lots of potentially useful information here, take a look:

http://graviteam.com/forum/index.php?topic=7545.msg15640#msg15640
Logged

"What am I, chopped liver..?"

"Yes."
minimi66
Major
****
Posts: 62


« Reply #10 on: December 04, 2012, 03:56:57 PM »

Hi all,

Just a quick update on progress with the editor.  Most of my work over the last two days has been trying to establish just whether this is really feasible and if it is how easy or difficult it is going to be.  Unfortunately i couldn't do this before my first post as i was on a merchant ship in the Indian Ocean with no internet connection for 2 weeks!

So over the last 2 days i have been researching on the VB programming forums and gathering advice on various possible methods to achieve the main tasks.  So with those two days behind me now, what have i learnt?

1.  It probably isn't going to be as easy as i had first hoped.
2.  It is probably going to take longer than i had hoped.
3.  It may not be possible at all.

Sorry to be so negative but at this stage it seems like there is probably a reason why Graviteam didn't implement the things i'm trying to do in the games existing mission editor.  Probably because they aren't easy to do at all due to the way the game files are structured.  People i've chatted with on the VB forums over the last 2 days have said they are amazed that the game relies on so many separate script files to do basic things like add mission names and add briefing text??  For instance, why not add all this sort of code into the scripts.engscr file as a separate macro block or in the .level file as an additional line??  Very strange indeed!

However despite all the above i am pressing on with this project and will do my best to bring it to some sort of success.  The main problem at the moment is finding code that will access a given .text file, locate a keyword string such as txt_cm_camp_stu_1, display it in a text box on a form and allow it to be changed before saving the file in its correct location.  Sounds simple but its actually a lot more difficult than i thought.   Never mind setting the program up to change every other instance of that text string that appears in 2 or 3 other game files but at the same time NOT change any of the other similar strings that apply ot other aspects of the mission!!  Roll Eyes

So there we are guys, sorry i can't be more positive but i'm not going to give you all a false idea of how easy this is when it isnt!  I will do my best and continue to work on it for the next couple of months at least possibly longer.  If anyone from the community has any ideas of suggestions or even VB or C#/C++ programming experience then by all means please contact me on this forum and we can brainstorm ideas and approaches to doing this?

Will continue to keep you posted.

Happy Tanking guys!
Logged
minimi66
Major
****
Posts: 62


« Reply #11 on: December 04, 2012, 04:09:02 PM »

By the way Kyth, thanks for the link you posted.  It was quite useful and i learnt a few thing s that i hadn't picked up so far in my exploration of the mission editing aspects of SFK42.

Also, does anyone know the story with the missing Panel 9 on the games existing mission editor??  Its mention in the editor manual and also appears in the Controls Menu in the game?  Could this be the missing panel that enables us to do all the missing things like adding briefings, map icons, mission names etc etc??  Be interested to hear if anyone knows about this panel or why it wasn't implemented?

Cheers.
Logged
frinik
Generalfeldmarschall
*****
Posts: 3145


« Reply #12 on: December 04, 2012, 04:10:43 PM »

 Minimi nobody expected t your task to be an easy oen and I think nobody is really having unrealistic expectations.The fact that you are willing to undertake what seems to be a rather inglorious and thankless chore is admirable in itself! We can only wish you Godspeed and hope you suceed.If not well at least you tried! You may want to PM Andrey 12345 on this forum. I think he was on the team of those who created SF and other Graviteam games.He might be able to help you or at least steer you in the right direction?

Cheers!
Logged
lockie
Generalfeldmarschall
*****
Posts: 2348



« Reply #13 on: December 04, 2012, 04:16:36 PM »

does anyone know the story with the missing Panel 9 on the games existing mission editor?
Could u enclose a picture, wat do u mean?
Logged

Provocative signature removed
minimi66
Major
****
Posts: 62


« Reply #14 on: December 04, 2012, 04:50:58 PM »

hi lockie,

Look at page 9 in the editor manual.  Shortcuts table item number 21 Tab#9 (not used)  Ctl-9

If you go to the controls menu in game settings in game, you will see keyboard shortcuts for the mission editor tabs, Ctl-9 is shown as Tab 9 but its not there in the mission editor itself.

Strange???



Logged
minimi66
Major
****
Posts: 62


« Reply #15 on: December 04, 2012, 05:18:27 PM »

@frinik

PM sent to Andrey 12345.

Thanks.
Logged
frinik
Generalfeldmarschall
*****
Posts: 3145


« Reply #16 on: December 04, 2012, 05:19:24 PM »

 True. It looks like they had originally intended to implement that tab and changed their mind thus the (Not Used).
Logged
minimi66
Major
****
Posts: 62


« Reply #17 on: December 04, 2012, 06:24:34 PM »

Would LOVE to know what it did??  I think we can guess??  Maybe Andrey will know, i will ask him.
Logged
Kyth
Generalfeldmarschall
*****
Posts: 2044


« Reply #18 on: December 05, 2012, 03:50:04 AM »

People i've chatted with on the VB forums over the last 2 days have said they are amazed that the game relies on so many separate script files to do basic things like add mission names and add briefing text??  For instance, why not add all this sort of code into the scripts.engscr file as a separate macro block or in the .level file as an additional line??  Very strange indeed!

Its struck me as odd also, to have the mission-specific settings spread over 4 separate files. But does it make a VB script impossibleShocked

However despite all the above i am pressing on with this project and will do my best to bring it to some sort of success.  The main problem at the moment is finding code that will access a given .text file, locate a keyword string such as txt_cm_camp_stu_1, display it in a text box on a form and allow it to be changed before saving the file in its correct location.  Sounds simple but its actually a lot more difficult than i thought.   Never mind setting the program up to change every other instance of that text string that appears in 2 or 3 other game files but at the same time NOT change any of the other similar strings that apply ot other aspects of the mission!!  Roll Eyes


In the case above, I assume you're just assigning the mission a name, linking it to a text file. The mission name is only linked once for each mission.  The names and histories are all saved in the 'text' folder. 

From the POV of a mission-maker, the flow of events in this little application might go something like:

1. Select the mission to edit, from a list.
2. Program does a search in the text folder for any instance of the string name (the 2nd comma-separated value in the mission entry).
3. If it doesn't exist, display the string name and throw up an alert to add in a new value. If it exists, display the string name and string value. These will be opened to the user to edit.
4. When the user selects 'Save':
- if it's a new value, create a new file in the text folder
- string name is updated to the mission entry and the text file, overwriting the previous name, if any.
- string value is updated to the file in the text folder, overwriting the previous value, if any.

I'm sure there are many possible refinements to this process, but you should get the basic idea by now. And it's a similar process to create a "blurb" for the mission. 
« Last Edit: December 05, 2012, 04:11:23 AM by Kyth » Logged

"What am I, chopped liver..?"

"Yes."
minimi66
Major
****
Posts: 62


« Reply #19 on: December 06, 2012, 10:47:30 AM »

Hi Kyth,

Thats an interesting workflow and from an experienced mission designer like yourself is very useful input into the design of this app.  I was thinking along similar lines but you have added a bit more flesh to the bones with what you say above.  The good news is that after posting requests for information on about 6 different VB forums and receiving nothing much back i have yesterday received a PM from a very experienced and knowledgeable programmer has has tentatively agreed to assist with some of the more complex coding aspects of the project (the stuff thats's above my experience/knowledge level!)  Grin
He does this stuff for a living so i/we will be lucky if we can get him on board to see this through.

I see my main task being establishing what the problems/tasks to be solved are in cooperation with the mission designers on this forum and also designing the visual look and feel of the GUI, something that i am very familiar with and able to do.  The hardcore coding will likely fall to my new found associate if he can dedicate enough time to it.  If not i think he will provide me with enough nudges in the right direction with the coding if i ask nicely.  I have a vast amount of VB resources (ebooks, videos, sample code etc) on top of the experience i gained when designing a couple of intelligence databases when i was in the military.  So with time i know i can find the right code to make this app do what we want it to.

Based on your workflow above i will put together an experimental GUI (with no code behind it as yet) and put up some screenshots for you guys to have a look at?  Based on your feedback i will then refine it and send the GUI shots to my VB guru who i'm sure will find it useful in getting into a SFK42 mission designers mindset.  I have already supplied him with a full set of mission script files in the correct folder structure and a copy of the mission editor manual.  He is going to spend a few days going through all that material before he recommends the best course of action.

So there we are for now, i will get to work over the next couple of days on this GUI and post some screenshots as soon as its looking fairly acceptable.

Keep the ideas coming and thanks for the continued interest and encouragement.
Logged
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Simple Audio Video Embedder
Valid XHTML 1.0! Valid CSS!