Muffin Projects
boosty
Techlog #5. Common poll of questions for all characters [en]
🕑 Added 2023-09-04 21:00:00 +0000 UTCAs you may have noticed, there is an item about Common questions poll in the update roadmap. Now I will try to tell what it is, and how I implemented it. Nothing complicated at all, but this will probably have to be removed from the update, as it will come out damp :c
The SequenceStep class itself is pretty primitive. It's doesn't really know anything. Just so as not to write heaps where in the dialog itself - I decided to put it together in this way.
This is how the boilerplate looks like to initialize the dialogue with each character in the game. There are main sequences (those that are plot), there are secondary sequences (such as Mirina's lesson), and now there is also common.
To programmatically display these options in the menu, a construct from the RenPy documentation is used.
$sequence_menu_line = search_sequence(astra_main_sequences, astra_sequence_step) - in fact, it just goes through the array and takes the sequences that are available for the character (by the requirments field from the SequenceStep class).
$sequence_menu_line = search_sequence(astra_main_sequences, astra_sequence_step) - in fact, it just goes through the array and takes the sequences that are available for the character (by the requirments field from the SequenceStep class).
In order for the characters to describe the appearance of the hero, I focus on the tags that I pre-registered for clothes. Tags are just a list of titles. For example: a character's croptop has the tags ["casual", "femine"].
To find out how many tags a hero has, I wrote the following function.
First we turn the items on our character into a sheet. Then we write all the tags values into another sheet and then make this sheet flat. We return the dictionary (dictionary) of values.
Comments
Balmy_Breeze
<div ><div><span class="text">It’s quite an amazing feature! Not many visual novels allow you to change clothes, let alone make characters able to response to what you’re wearing. Maybe for this update, you can just focus on two or three main tags and make a default dialogue for all the other tags. And complete all tags in next update. Or you can just put off this feature until next update. So you can take your time and write great dialogues. Anyway, amazing work!</span></div></div>




