project-navigation
Personal tools

Author Topic: How to update tutorials' screenshots?  (Read 13866 times)

Offline Damyen

  • Rookie
  • ***
  • Posts: 72
    • View Profile
How to update tutorials' screenshots?
« 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?)

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: How to update tutorials' screenshots?
« Reply #1 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

Offline Damyen

  • Rookie
  • ***
  • Posts: 72
    • View Profile
Re: How to update tutorials' screenshots?
« Reply #2 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 :)

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: How to update tutorials' screenshots?
« Reply #3 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)

Offline Damyen

  • Rookie
  • ***
  • Posts: 72
    • View Profile
Re: How to update tutorials' screenshots?
« Reply #4 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)?

Offline Damyen

  • Rookie
  • ***
  • Posts: 72
    • View Profile
Re: How to update tutorials' screenshots?
« Reply #5 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?

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: How to update tutorials' screenshots?
« Reply #6 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)

Offline Damyen

  • Rookie
  • ***
  • Posts: 72
    • View Profile
Re: How to update tutorials' screenshots?
« Reply #7 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.

Offline Damyen

  • Rookie
  • ***
  • Posts: 72
    • View Profile
Re: How to update tutorials' screenshots?
« Reply #8 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?)?

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: How to update tutorials' screenshots?
« Reply #9 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:

  • pos: The UI will be scaled to the current resolution, but you have to script as if it were a 1024x768 resolution screen — that is if you set the position of something to "512 384" it's top left corner will appear right in the middle of the screen (regardless of actual resolution)
  • enlarge: From what I can see it is supposed to cause the object to "grow" over time (just like speed causes it to move over time) but it doesn't seem to be working, may be a bug.
  • rem vs delete: AFAIK both are equivalent rem seems to be favoured in the sequence scripts, while delete seems to be the norm in the UI scripts, so I suggest you use rem.
  • Images: We prefer png
  • Testing: Yes you can test your changes without leaving the game, but if you change the files with the game open you'll have to use the 'fs_restart' command so the game re-reads the scripts from disk, then you can use seq_start to start the sequence.

Offline Damyen

  • Rookie
  • ***
  • Posts: 72
    • View Profile
Re: How to update tutorials' screenshots?
« Reply #10 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)

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: How to update tutorials' screenshots?
« Reply #11 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)

Offline Damyen

  • Rookie
  • ***
  • Posts: 72
    • View Profile
Re: How to update tutorials' screenshots?
« Reply #12 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?

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: How to update tutorials' screenshots?
« Reply #13 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.

Offline Damyen

  • Rookie
  • ***
  • Posts: 72
    • View Profile
Re: How to update tutorials' screenshots?
« Reply #14 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).