Author Topic: General Discussion  (Read 3813759 times)

0 Members and 6 Guests are viewing this topic.

Offline Dusk

  • Newbie
  • *
  • Posts: 9
Re: General Discussion
« Reply #4140 on: December 18, 2014, 07:43:50 AM »
Well uh...I checked out the Ren'py thing and I think i get it? sort of?  I'm still a newborn chick to these kinds of things.

In any case, how do I go about adding in 'dialogue' and where is it needed?

From what I gather, I'm focusing on this one correct?

Writing Dialogue:

(Each '-' indicates the line of code it is referring to.  Starting from the top going downwards.)
Code: [Select]
label xyz:

   scene behind the house
   show Name emotion

      "blah blah blah."
      "Header" "blah blah blah"

- Indicates name to the place of a program
- Some sort of contextual thing?
- Reference to some sort of mood?
- Simple saying statement (1 Argument)
- Same as above + a Header (2 Arguments)

Code: [Select]
define abc = Character(_("Name"), color="#ffcccc")

   abc "blah blah blah"
   abc "blah blah blah \"ring-a-ling\"?"

- Redefines the character code.
- Output is: Name (Header with a colour) - blah blah blah.
- The \" indicates a special character.  Output is: Name (Header) - blah blah blah "ring-a-ling"?

I'm also not quite clear on how to manipulate fonts (size, boldness, outlines, italics, struckthrough, spacing, timing, etc.).  If someone could clarify that to me that'd be nice.

Edit: Format change for better easier viewing.
« Last Edit: December 19, 2014, 07:01:19 AM by Dusk »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #4141 on: December 18, 2014, 12:09:09 PM »
Right... so one thing at a time:

You could glance through this useful thread: http://www.pinkpetal.org/index.php?topic=3489.0 It'll help you with using the forums correctly. You need to encase code as code for example to make it better readable.


Well uh...I checked out the Ren'py thing and I think i get it? sort of?  I'm still a newborn chick to these kinds of things.

In any case, how do I go about adding in 'dialogue' and where is it needed?

From what I gather, I'm focusing on this one correct?
Writing Dialogue:

label xyz: //Indicates name to the place of a program

Yeap:

Code: [Select]
label my_label:
    # code

does just that and the whole game is structured in labels. For that reason there is no main loop that you often see in the games, it is instead handled internally by the Ren'Py engine.

   scene behind the house //some sort of contextual thing?
   show Name emotion //Reference to some sort of mood?

   "blah blah blah."               //Simple saying statement (1 Argument)
                                        // The \" indicates a special character
   "Header" "blah blah blah" //Same as above + a Header (2 Arguments)

scene and show are both Ren'Py script statements.

There are five script languages that are used in Ren'Py:

- Python (The most powerful one by a long-shot)
- Ren'Py script.
- ATL
- Style
- Screen

Everything written in the latter four can be done with python. Latter four were created to simplify the most useful things and reduce coding time required to get things done. They are all basically wrappers for Python equivalents.

Ren'Py script used mostly for advancing normal, VN type gameplay. Scene statement you mentioned will remove all displayable on the layer ("master" by default) and show a new displayable. It's mainly used to clear stuff for a new sequence of events and texts and to show a new background. show statement just shows a displayable.

ATL (Animation and Transformation language) provides sets of instructions to displayable to change their properties, like position, size, rotation, alignment and so on. Basically it's use to tell a displayable to move, change shape, cut a piece of itself, zoom, change it's size and etc.

Style provides properties to a displayable as well but there are not used to transform a displayable, rather to "set it up". It does also deal with size and positioning but it is used to provide it, not change after displayable has been rendered.

Screen language (now Screen Language 2 starting with Ren'Py 6.18) is used to create screens, which are basically groups of displayable to provide information and get input from player.

*Should be noted that everything you see on the screen in Ren'Py is a displayable, including texts. It's a useful thing to know if you ever decide to dig a bit deeper.

define abc = Character(_("Name"), color="#ffcccc")

   abc "blah blah blah"                          //Output is: Name (Header with a colour) - blah blah blah.
   abc "blah blah blah \"ring-a-ling\"?" //Output is: Name (Header) - blah blah blah "ring-a-ling"?

define is another Ren'Py script statement I tend to avoid because while Ren'Py developer has explain it to be twice already, it still tends to screw me over whenever I use it for anything important... it mostly deals with improving debugging.

Code: [Select]
$ abc = Character(_("Name"), color="#ffcccc")
Does a very similar thing. Dollar sign is a statement for a Python oneliner. it is basically telling the game: This line is in Python.

Code: [Select]
python:
    # code

means any code indented afterwards is python.

I'm also not quite clear on how to manipulate fonts (size, boldness, outlines, italics, stuckthrough, spacing, timing, etc.).  If someone could clarify that to me that'd be nice.

Fonts can be manipulated in a number of ways. For example:

Code: [Select]
abc "{size=40}{b}blah blah blah{/b} \"ring-a-ling\"?"
will render the entire line in size 40 and the encased bit in bold. There is a documentation with all options: http://www.renpy.org/doc/html/style_properties.html#text-style-properties

Obviously this is far from ideal so you can also provide properties when you define the sayer:

Code: [Select]
$ abc = Character(_("Name"), color="#ffcccc", what_bold=True, what_size=40)
or use styles (possibly the most convenient way).

================================
It should be noted that PyTFall has most of this stuff preset. Like we've already picked a font, window will be automatically defined for you and all characters in the game has been setup with their portraits to be shown.

We also generally do not use show statements for sprites because we do not use internal cataloging system for images. There are plenty of examples for this stuff in the game.

You need to create an account for SourceForge and PM me your login. I can then add you to the project.

Instructions are in this thread: http://www.pinkpetal.org/index.php?topic=2125.0
Like what we're doing?

Offline Dusk

  • Newbie
  • *
  • Posts: 9
Re: General Discussion
« Reply #4142 on: December 19, 2014, 06:48:37 AM »
Forgive my inexperience here but:

Quote
Fonts can be manipulated in a number of ways. For example:

Code: [Select]
abc "{size=40}{b}blah blah blah{/b} \"ring-a-ling\"?"...
Obviously this is far from ideal so you can also provide properties when you define the sayer:

Code: [Select]
$ abc = Character(_("Name"), color="#ffcccc", what_bold=True, what_size=40)

What would second line of code output?  Or more specifically what does this portion of the code do?

Code: [Select]
what_bold=True, what_size=40
Does it make all the lines spoken by this character bold and size 40 font? Or just the whenever the word what shows up?

Offline Thewlis

  • Jr. Member
  • **
  • Posts: 74
  • Its hentai, quiaff?
Re: General Discussion
« Reply #4143 on: December 19, 2014, 07:24:57 PM »
Anything beginning with "what_" in a Character() call applies that to what the character says. Anything beginning with "who_" applies to their name. Basically:

"who": "what."

Offline Dusk

  • Newbie
  • *
  • Posts: 9
Re: General Discussion
« Reply #4144 on: December 21, 2014, 12:54:40 AM »
Thank you for the brief explanation Thewlis.

Is it possible for you to write a small example of code and then showing the output?

I feel that an example would best reinforce your explanation and assist me in my coding predicament.


Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #4145 on: December 21, 2014, 06:35:49 AM »
$ h = Character(_("Hinata"), what_bold=True, what_size=40)

h "Hi, my name is Hinata!"

Will show:

========
Hinata
Hi, my name is Hinata!
========

*Bold text will be size 40 as well, but that translates to the forum poorly.

It's not the only way to display text in PyTFall. It's also not how we usually define ingame characters, although we do define NPC in a very similar fashion. Don't rush and try to understand it all right off the bat. It will all come together soon enough.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #4146 on: December 24, 2014, 01:01:44 PM »
I wrote a simple tagger just now to find out how rusty my Delphi skills are.
How did you handled identical file names in case of identical tags in your renamer? I do hope you did, and not just replace old ones with new ones :)
 
« Last Edit: December 24, 2014, 02:16:27 PM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #4147 on: December 24, 2014, 02:16:28 PM »
I wrote a simple tagger just now to find out how rusty my Delphi skills are.
How did you handled identical file names in case of identical tags in your renamer? I do hope you did, and not just replace old ones with new ones :)

What do you mean by identical file names? I can't quite follow the question :(

If you mean two files tagged with the exact same tags, it's not an issue. There are four completely random characters at the end of each filename to prevent collision.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #4148 on: December 24, 2014, 02:31:00 PM »
Hm, I see. That's probably not an ideal solution though, they still could be identical, just with very low probability. It's possible to make them more unique using numbers in alphabetical order.

I also researched metadata a bit. Both jpg and png have 64kB limit for metadata length, while because of windows filename and pathname limitations (puny 260 characters) we or players might have problems eventually. I just recently stumbled upon it while unarchiving some file. Are you about using file names?
Delphi can work with meta too, though it won't be nearly as quick and easy as file names.
« Last Edit: December 25, 2014, 03:42:26 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #4149 on: December 24, 2014, 03:08:58 PM »
Hm, I see. That's probably not an ideal solution though, they still could be identical, just with very low probability. It's possible to make them more unique using numbers in alphabetical order.

I also researched metadata a but. Both jpg and png have 64kB limit for metadata length, while because of windows filename and pathname limitations (puny 260 characters) we or players might have problems eventually. I just recently stumbled upon it while unarchiving some file. Are you about using file names?
Delphi can work with meta too, though it won't be nearly as quick and easy as file names.

Filesnames are faster. I'll also add an option to "fix" players setup when he/she is satisfied with it and load database from binary.

Rudi who researched the topic for years, excluded metadata as an option because for thousands of images, reading it is very slow (we are talking 20+ minutes on his claims). Doubt that we'll ever run into filenames that are too long. Our realistic options are that and json or xml.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #4150 on: December 25, 2014, 03:40:57 AM »
Renamer wastes a lot of space on "-" symbols. We could greatly reduce the danger of exceeding the limit by abandoning them.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #4151 on: December 25, 2014, 06:44:16 AM »
Renamer wastes a lot of space on "-" symbols. We could greatly reduce the danger of exceeding the limit by abandoning them.

I don't see the danger, take a look at the files. We can remove it or go back to json and implement my binary fix idea with json tags if you believe that your concerns are valid.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #4152 on: December 25, 2014, 03:54:15 PM »
What types of pictures the game supports in girls packs? I recall you mentioned that it doesn't support animated pictures, but I'm not sure about bmp for example.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #4153 on: December 25, 2014, 07:00:57 PM »
What types of pictures the game supports in girls packs? I recall you mentioned that it doesn't support animated pictures, but I'm not sure about bmp for example.

Ren'Py supports:

    JPEG/JPG
    PNG
    BMP
    GIF

But we only check for png and jpg in the game.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #4154 on: December 26, 2014, 10:45:49 AM »
There is one bmp in the game folder, it's game\content\gfx\interface\images\story\caravan\sword1.bmp. That's why I wondered about bmps.

When I'm worried about filename limit, I think about files like fj30fj380fhwrfwr03h5f101h3fh035hf50hy4437656480wynhyrjhrhre hygh5.jpg that you easily can find on various hentai sites.
They already have long names, so when we add tags we make them even longer. It's not a problem in our packs only because me and Cherry rename pictures before using them.

Perhaps we could force people to use no more than four characters for file names, excluding tags. I'll add autorenamer that will rename all files in the target folder to their alphabetical hexadecimal numbers. That would be from 0000.jpg to FFFF.jpg, meaning 65535 pictures per girl (I think it's enough  :) ). So after tagging process they will look like 00A1-pr-r3-h2.jpg.
« Last Edit: December 26, 2014, 10:48:22 AM by DarkTl »