UFO:Alien Invasion

Development => Newbie Coding => Topic started by: Damyen on September 15, 2016, 09:26:09 pm

Title: How to update tutorials' screenshots?
Post by: Damyen on September 15, 2016, 09:26:09 pm
Hello. I would like to update the screenshots used in the tutorials for the v2.6 version. How can I do it? (Thas is : where are the screenshot files? and are there some things to be careful at?)
Title: Re: How to update tutorials' screenshots?
Post by: DarkRain on September 16, 2016, 10:39:07 pm
The images are at <ufoai directory>/base/pics/tutorial

Honestly current tutorial is so outdated that I'll say this: if you want to contribute to the tutorial there's no need to limit yourself to replacing the current images, feel free to come with you own sequence of images if you feel its better, at this point it will be much better (and easier) to redo the whole tutorial around what you can provide
Title: Re: How to update tutorials' screenshots?
Post by: Damyen on September 16, 2016, 10:54:08 pm
Thanks!

The problem about changing other things in the tutorial is that I don't feel skilled enough: I don't know how to change gettext msgids (to add advices), and I don't know how to change the flow of images (because I don't have any real programming skill). Of course, I can learn, and listen to advices and tips.

I'll try to replace the existing images to improve the slideshow first, and if you are happy with it, I'll try to do some more updates :)
Title: Re: How to update tutorials' screenshots?
Post by: DarkRain on September 17, 2016, 01:43:02 am
We can always work together you know, but it's OK to do things at your own rhythm,

But if you feel like poking into the tutorial sequence anyway, you can take a look at the script at base/ufos/seq_tutorials.ufo it shouldn't be too hard to get an idea of what's going on in it (I think)
Title: Re: How to update tutorials' screenshots?
Post by: Damyen on September 17, 2016, 01:23:26 pm
I made a mistake in my analysis: I tought that each single tutorial was a sequence of images displayed one afer one while text was printed over (or above or under) them. Wrong... :P. Only one tutorial is a slideshow (campaign), others are basicaly a single image with program adding its comments over it (= text and display not clearly separated).

I could change the image order in the campaing tutorial (=renaming the .pk3 containing images into .zip, adding my own images, renaming .zip into .pk3, lauching the game, and testing the result). I will now look at base/ufos/seq_tutorials.ufo to check whether i guess how it works (or not:))

And of course, we can work together :). I just didn't know if you had some spare time to do that. What would be your idea to rework these tutorials (knowing my lack of technical skills)?
Title: Re: How to update tutorials' screenshots?
Post by: Damyen on September 17, 2016, 02:32:16 pm
Ok, I think I understand how it works: you have images, and the "seq_tutorials.ufo" scripts tells what to do with them. So changing the script changes the sequences, with keywords to put images on a certain position (pos), remove images (rem), wait for X seconds (wait), etc.

I will start some testing with the campaign tutorial to get familiar with it (this will take some time, and I probably will ask for help:)). Which is the .pk3 that contains the sequence (to test changes on my computer)? Is there a short readme explaining all the keywords in the seq_tutorials.ufo script?
Title: Re: How to update tutorials' screenshots?
Post by: DarkRain on September 17, 2016, 04:24:38 pm
You don't need the *.pk3 files to test changes (or event to play the game) you can extract the files to the appropriate directories and run the game from those (the game should override the files in the pk3 with the extracted ones but some people like to remove the original *.pk3 - or better yet back it up somewhere else- to avoid conflicts)

So for example extract the pics to base/pics and the *.ufo files to base/ufos (or you could even extract/create only the files you need to override those in the *.pk3) make you modifications and run the game to test, you can also add new images and script files if needed, as long as they are in the right directories the game will use them fine.

And of course be sure to check our wiki to learn more about the sequence scripts: http://ufoai.org/wiki/UFO-Scripts/seq_*.ufo

Feel free to ask any questions that you have, but at this point, even if all you cold do is provide a bunch of images and a text file with the notes to go with them I'd be happy to arrange the sequence to the best of my ability (I'm not very artistic but it still would be much better than we currently have for sure)
Title: Re: How to update tutorials' screenshots?
Post by: Damyen on September 17, 2016, 09:51:08 pm
Thanks! That's exactly what I needed. I'll try to do my best, and ask if any question arises.

I will ask for help for sure, because I think I will also change the texts that comes with the images (because they are a bit outdated too). But it will be in a few days (weeks), time to make my first steps and mistakes with this sequence file and check what I can do with images.

PS: and thank you for your other answer (about changing polices); I will start with that point.
Title: Re: How to update tutorials' screenshots?
Post by: Damyen on September 20, 2016, 09:24:59 pm
Hello. I made some tests, and you were right: "it will be much better (and easier) to redo the whole tutorial". Well, this implies a few questions about scripts and testing them.

* Seq_tutorial.ufo, obj2d:
 - "pos" : presented as "normalized to 1024x768 resolution"; what happens to objects when not displayed on that resolution?
 - "enlarge" : how does it work? (I tried to put a x,y "destination" - assuming that the beginning was the position of the objet set by "pos" and that the 2 dots would define the diagonal sizing the object-, or tried a sort of percentage, but I couldn't achieve anything).
 - "rem" vs "delete": what is the difference between them (word size excepted :) )? Is one of them deprecated?

* Images: better use .jpg or .png ?

* Testing: can you test a modified sequence without quitting the game (I tested via the console, and seq_start, but it didn't work... my mistake maybe?)?
Title: Re: How to update tutorials' screenshots?
Post by: DarkRain on September 24, 2016, 06:30:52 pm
Hi,

sorry for the lack of a timely response, I had some computer troubles...

As for your questions:

Title: Re: How to update tutorials' screenshots?
Post by: Damyen on September 24, 2016, 11:29:44 pm
Hi,

No problem, not in a hurry (i just played the game and stored screenshots), and thanks for answering, whatever the delay :)

Maybe the wiki could be updated to keep record of your answers (I also notice the "size" keywork that is undocumented)? (I am quite familiar with wikis, so I could do it... But have I to create another account? The one for the forum is not working)
Title: Re: How to update tutorials' screenshots?
Post by: DarkRain on September 25, 2016, 11:55:57 pm
Yes, the wiki is always in need of updating, it indeed needs a different account from the forum, the problem is  you'd need to have an admin (which I'm not) creating one for you, as new account creation has been disabled (we had lots of spam in the past)
Title: Re: How to update tutorials' screenshots?
Post by: Damyen on September 26, 2016, 06:31:22 pm
Ok, I'll wait (many passwords required here ;), but, well, spam is always a problem).

I have other questions:
- I have the impression that the "align" keyword doesn't work for images; is this correct?
- I changed the tutorial menu just by adding sequences (to prepare the incoming tutorials); is this enough, or should I care for something else?
Title: Re: How to update tutorials' screenshots?
Post by: DarkRain on September 26, 2016, 08:04:14 pm
Yes, many paswords indeed...

1) Quick code dive shows your impressions are rigth: align works for text only.
2) If that means new entries in the tutorial menu then a bit of UI scripting is in order.
Title: Re: How to update tutorials' screenshots?
Post by: Damyen on September 27, 2016, 03:23:18 pm
Ok then. I removed "align"s with images.

And here is my first attemp with the tutorial sequence. I zipped together :
- the seq_tutorial.ufo and its backup (=original file),
- the screenshots used by the new sequences (provided in the .jpg format to reduce the size of the zip; but I work with .png images only).

Only the "Introduction" and the "Campaign: part 1" tutorials are working. Please tell me what do you think about this first proposal (don't hesitate to criticize).
Title: Re: How to update tutorials' screenshots?
Post by: DarkRain on September 28, 2016, 03:54:58 am
Yes, that's much better, only a few details: 1) the parts with dark blue text on a black background might be a bit hard to read, 2) you show the text for a couple seconds before showing the related image that was bit weird at first, maybe because a I was expecting an image, but I quickly got used to it, so not a big concern here 3) the campaign tutorial might be a bit spoilery (like about XVI)?
Title: Re: How to update tutorials' screenshots?
Post by: Damyen on September 28, 2016, 03:17:45 pm
Thanks for this feedback.
1- Ok. Maybe using some light blue (turquoise), like in the rest of the interface could do.
2- I choosed to do so to force reading of the (short) text, to give the feeling that waiting time was not too long, and to ease transitions (when text only is used). But i can synchro text + images if you prefer: the aim is to let readers feel comfortable. And it's always difficult to deal with tastes :)
3- I hesitated, but during campaign, I noticed that this button appears before XVI was mentionned in mails (and after campaign started). I'll will remove it though.

I had another idea for a new tutorial called "Tactics". If the players could feed some screenshots (1024 x 768) and comments, we could make a nice introduction to battle tactics (example: armor piercing capabilities for some rifles, use of smoke & incendiary grenades, use of IR googles to spot hidden ennemies, way to cover eachother, etc.).
Title: Re: How to update tutorials' screenshots?
Post by: DarkRain on September 28, 2016, 05:54:28 pm
Thank you for helping with the tutorials
1) Yes, that might work I guess.
2) Your call, as I said it's not a big concern, it's just that having the text on the top of the screen with most of the screen empty felt a bit weird at first, but that's my own taste I guess, so as I said: it's your call here.
3) Well XVI is supposed to be the big spoiler in the game (never mind that it's not really implemented yet), if the button is showing before the related mail that must be a bug.

Sure, if people want to illustrate some of their tactics that might help.
Title: Re: How to update tutorials' screenshots?
Post by: Damyen on September 29, 2016, 06:49:17 pm
Glad to help if I can :) This is the bright side of free and open source projects.

I am checking the "Tactics" forum to see what would be useful first, and reading gave some ideas for early integration of basic principles (for example, I already added a tiled view of the buildings that have an exit to the surface in the 2nd campaign tutorial). When tutorials are completed, I'll probably add a topic to ask for further ideas (but better finish "work in progress" first).

I'll submit another "preview .zip" in 2 tutorials.
Title: Re: How to update tutorials' screenshots?
Post by: DarkRain on September 30, 2016, 05:24:51 am
Nice, I'll be looking forward to it :)
Title: Re: How to update tutorials' screenshots?
Post by: Damyen on October 07, 2016, 10:25:50 pm
Here is a new zip containing the updated seq_tutorial.ufo and screenshots (.jpg format to reduce size of the zip). List of changes :
 - All tutorials: turquoise used for titles ; text and images now synchronized; some rewriting; some renamed or updated screenshots (remove the old ones); different musics for different tutorials.
 - "Introduction tutorial" : added "skirmish" and "multiplayer" quick intro.
 - "Campaigns: part 1" tutorial: removed spoiler info.; added "air-defence" info (txt + img).
 - New tutorials : "Campaigns: part 2" and "Tactic battles".
I also tried to include the most useful tactictal tips in the tutorials.

I will continue with the last two tutorials, explaining how to set skimish or multiplayer games. I just would like to ask: are multiplayer games over the Internet only, or other connexion modes (even legacy one) are supported (even if not displayed)?

Please tell me what do you think (or just tell me that this second version... is better than the first one :D )
Title: Re: How to update tutorials' screenshots?
Post by: DarkRain on October 08, 2016, 08:34:51 pm
Well it is even better than before yes ;)

I like it, and things I mentioned before have been addressed so I'm happy :)

Regarding multiplayer: well I'm not familiar with it, really, but from my recent testing it seems that the game will crash if you try to create a server without an internet connection, whether it crashes because you're not supposed to do that or some other oversight I don't know (but obviously crashing is a serious bug), but once the server is created others can connect over LAN with the local IP address of the machine running the server (it is even possible to connect to other instances of the game running on the same machine, but that is IMO a very poor hot-seat setup :P)
Title: Re: How to update tutorials' screenshots?
Post by: geever on October 09, 2016, 12:03:04 am
First of all thank You for your efforts. I really like it.

I was thinking about if the research screen also spoiler a bit too much, but it is okay.

First I was confused, you said we should remove the old images so I applied the new set on a clean branch. Apparently these files were still needed from version 1:
Code: [Select]
$ for FILE in `grep -P 'image\s*"' base/ufos/seq_tutorials.ufo | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/' | sort`; do if [ ! -f "base/$FILE.jpg" -a ! -f "base/$FILE.png" ]; then echo "Missing image: $FILE"; fi; done
Missing image: pics/tutorial/campaign1DisplayExample
Missing image: pics/tutorial/campaign1DisplayOptions
Missing image: pics/tutorial/campaign1FinancialGraphs
Missing image: pics/tutorial/campaign1Installations
Missing image: pics/tutorial/campaign1MailclientAndUFOpaedia
Missing image: pics/tutorial/campaign1Mails
Missing image: pics/tutorial/campaign1Messages
Missing image: pics/tutorial/campaign1MissionStart
Missing image: pics/tutorial/campaign1StatisticsMenu
Missing image: pics/tutorial/campaign1TimeFlow
Missing image: pics/tutorial/introBattlescape
Missing image: pics/tutorial/introGeoscape


Another thing I noticed that you had to create several images from the same screen to highlight different parts of the UI. More images mean more memory and disk space consumption. So I checked if there was a way to draw a border around objects in the sequence scripts but there wasn't... Until now! The sequence renderer is a crap, we should really merge it into the UI framework, but that's for another day. However I quickly patched a few lines for the border feature:

Code: [Select]
       obj2d outline1
       {
               pos             "512 200"
               size            "300 200"
               border          2
               bordercolor     "1 .53 0 0.5"
       }

This border is a simple rectangular one without rounded edges but you can combine it with wait and rem commands to go through the buttons on a screen pointing on each of them once...

-geever
Title: Re: How to update tutorials' screenshots?
Post by: Damyen on October 09, 2016, 04:59:32 pm
Thank you for your feedbacks, encouragements, and testing!

I like it, and things I mentioned before have been addressed so I'm happy :)
If I can, I try :)

I was thinking about if the research screen also spoiler a bit too much, but it is okay.
Yes, I had some concerns here, but I was thinking that adding images taking advantage of the nice art of the game could be a good incentive for new players. So, to reduce spoilers, I mainly choose early technologies of the campaign, or weapons listed in the sirkmish or multiplayer modes.

First I was confused, you said we should remove the old images
My fault... I should just have said: overwrite duplicates, and optionally remove <list of unused images>. The missing files are in the first zip, and are still needed indeed  (the second zip is a sort of "upgrade" of the first one, not a standalone version).

So I checked if there was a way to draw a border around objects in the sequence scripts but there wasn't... Until now!
Thanks! When I made my early tests, I tried to use the "size" keyword to highlight objects with semi-transparent rectangles, and was not really happy with it: labels became dim; placing the rectangles was not always easy (and was not sure about their positions on different screen resolutions). Moreover, when writing my ideas with pen and paper (oldschool way :) ), I noticed I would use many different screenshots anyway, and concluded that using screenshots only could also be an advantage: updating the sequence was really quicker and easier, just replace files without diving in the code (when trying different screenshots and highlights, this is a real time saver).

So I think I should proceed carefully: first finish the tutorials with screenshots only; then, download the new nightly build to check the changes in the GUI (I noticed in the commit log that you "updated some UI to give more space for texts"; nice!) and to get an updated sequence renderer; then, update screenshots; then, post patches in the bug tracker to keep record of this first versions of tutorials; and then only, test the new keywords.

Hence... Some more questions to help finish the tutorials.
 a) About text: will text be correctly updated in the .po files? In the current seq_tutorial.ufo, I just recorded deprecated text, and directly replaced the old entries with "_Something like that".
 b) About skimish mode / multiplayer: what is the "download" tab for? What do you download with it?
 c) About skimish mode: what is the effect of "alien rush"? and the effect of the "max soldier" setting in the "default" tab (I tested it, and had the impression it was the max. number of equipped soldiers you have in battle... but I had a strange behaviour after the first try: whatever the setting, I was getting the same squad over and over. So, some doubts here...)?
 d) In the multiplayer mode, what is the difference between "password" and "Rcon password"? (As I understand it, Rcon password is an administrator password to remotely connect to the server; and password is used by players to connect to the server... Some doubts here again)
Title: Re: How to update tutorials' screenshots?
Post by: DarkRain on October 09, 2016, 07:05:08 pm
Always glad to help :)

So, answers:

Edit: BTW I was wrong earlier about MP: you can create a server without an internet connection, the game only crashed when no network connection was available at all, so you can play over LAN without internet
Title: Re: How to update tutorials' screenshots?
Post by: Damyen on October 09, 2016, 08:30:31 pm
All clear!

we have our own scripts to handle that
Nothing to do, that's always good to read :)

"Alien rush" will keep spawning more aliens every turn until you lose or quit (or you manage to win: you'd need to kill every single alien in the whole map before ending your turn)
Alien rush seems quite a challenge. And no hall of fame to record exploits... ;)

"Max Soldiers" is the max amount of soldiers per player/team that should spawn in the map
On my build of the 09/09 (windows version), this doesn't seem to be working: I tried with four (max. soldiers), and the spawned squad was eight phalanx soldiers, but only four equiped (the other four carried nothing at all). I don't remember the chosen map (=don't remember if there was a dropship to chose, and then if there could be some conflict between "aircraft choice" and "max. soldier" parameter).

the game only crashed when no network connection was available at all
Ok, this is just a glitch. I'll try to write something like "connect your computer first, and then set your multiplayer game" (draft sentence).
Title: Re: How to update tutorials' screenshots?
Post by: Damyen on October 11, 2016, 08:38:22 pm
Here is the third zip containing the updated seq_tutorial.ufo and screenshots (.jpg format to reduce size of the zip). It contains all the .ufo sequences for tutorials, but only the updated or new images.

List of changes :
 - "Introduction" tutorial: changed sentence introducing multiplayer (last sentence = "Start a server if you want to host a game, or connect to the lobby to wait for an active server.").
  - renamed images (just remove introCampaignFinancialGraphs, and campaign1FinancialGraphs; renamed files, "introCampaignFunding" + "campaign1Funding", are in the zip).
  - new tutorials: "Skirmish", "Multiplayer".

"Multiplayer" tutorial was build using on line info (manual), and tested using multiple instances of the game on my computer; error checking is welcome :) After taking in account your feedbacks, do you mind if I post the patches of this first version in the bug tracker, with .png images (total size: about 40 Mo)? It will allow me to rework images a little bit later, at a slower pace (I first proposed to take in account the GUI changes quite quickly, but I don't know whether I will be able to do it during these incoming days).
Title: Re: How to update tutorials' screenshots?
Post by: DarkRain on October 12, 2016, 10:55:40 pm
Nicely done, one thing that might be worth to mention in the MP tutorial is that when all players check the "I'm ready" checkbox the game will start automatically (just so no one is caught by surprise)

Yes it should be nice to have the first version of the tutorial in the tracker (maybe even in game) for added convenience and safety.

Title: Re: How to update tutorials' screenshots?
Post by: Damyen on October 13, 2016, 04:43:58 pm
Nicely done, one thing that might be worth to mention in the MP tutorial is that when all players check the "I'm ready" checkbox the game will start automatically (just so no one is caught by surprise)
Yes, this is an useful information!

Yes it should be nice to have the first version of the tutorial in the tracker (maybe even in game) for added convenience and safety.
Yes, indeed: even if I am careful when moving, modifying, or overwriting these files, mistakes do happen here :) I'll post the patches soon.
Title: Re: How to update tutorials' screenshots?
Post by: DarkRain on October 15, 2016, 10:24:07 pm
Oh I noticed the patch is in the tracker now, good :)
Title: Re: How to update tutorials' screenshots?
Post by: Damyen on October 16, 2016, 05:57:55 pm
Yep: files shared and saved. I can be forgetful again (a real pleasure) 8)