Return to repo list

heart-of-gold

Tactical RPG written in python, using pygame.
Return to HMagellan.com

commit 5860c1a25dbf8dfff3649f68a78f44d363738cd6
parent 784b0e8cd87e02e475289fcca636c842afa5c714
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Fri, 29 Jan 2021 12:35:41 -0600

fix up some problems with scene segments

Diffstat:
Adata/etc/introvidscript.txt | 30++++++++++++++++++++++++++++++
Mdata/json/menus/mainmenu.json | 2+-
Adata/json/scenes/scene1.json | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/base.py | 11+++++++++++
Msrc/scene.py | 2++
5 files changed, 104 insertions(+), 1 deletion(-)

diff --git a/data/etc/introvidscript.txt b/data/etc/introvidscript.txt @@ -0,0 +1,30 @@ +It is an age of darkness. It is a time of chaos. The lands of the Ymbrian Empire have declined in the absence of their ruler. + +In the former Kingdom of Klassinoa, petty warlords raise armies to vie for scraps of wealth and power amongst ravaged ruins from days gone by. The Klassinoan people suffer + at the hands of these opportunists, who behave like little more than brigands. + +The warlords push anyone of fighting age into service in their armies. Able-bodied Klassinoans die by the thousands in the wars, and the villages are populated mostly with + fatherless children, the infirm, and the elderly. Crops fail in the absence of workers. Famine and disease are rampant. + +In the nation's south, a general known as Uolgro Yorlith has amassed a fearsome army. Striking from his base at Sassonod, he has taken control of much of the Heartmarsh and + the eastern grasslands, and has positioned himself as the strongest contender to rule the whole of Klassinoa. + +Yorlith is feared by all for the wanton cruelty of his armies, which have become infamous for razing towns and slaughtering entire populations. The terror his forces inspire + has been politically advantageous to Yorlith, and he has chosen to encourage his mens' wickedness rather than try to control them. + +Across Klassinoa, this has been the sorry state of affairs for as long as anyone can remember. + +But now, a new day is dawning. + +From the west, out of the vast cosmopolitan Naval States, an adventurer named Jisella has travelled to this war-torn land. + +Bold, cunning, and covetous of wealth, Jisella is a warrior and treasure-hunter of uncommon skill. She has already made a name for herself in her own country, an has now come + to Klassinoa to find the Treasure of the Crystal Mountains. + +This mythical treasure horde is said to date from the height of Klassinoan power, some five centuries ago. For years, the inhospitable terrain of the Crystal Mountains, in + Klassinoa's northwest, has protected this treasure, and many now wonder if it even exists at all. + +Jisella has vowed to recover the treasure for herself. Aided by a mountaineer guide, She approaches the mountains. + +Though she herself does not yet realise it, Jisella's decision to travel to Klassinoa has already set in motion a series of events that will define the future of not just this + beleagured kingdom, but of the entire Ymbrian Empire... diff --git a/data/json/menus/mainmenu.json b/data/json/menus/mainmenu.json @@ -23,7 +23,7 @@ "effects" : [ { "call" : "ef_game_switch_mode", - "data" : ["Still_Scene_Mode", "testscene.json"] + "data" : ["Still_Scene_Mode", "scene1.json"] } ] }, diff --git a/data/json/scenes/scene1.json b/data/json/scenes/scene1.json @@ -0,0 +1,60 @@ +{ + "name" : "Chapter 1 Intro", + "fonts" : { + "A" : ["ArchivoNarrow-Regular.otf", 28] + }, + "bg_sheet" : "bg_crystal_mountains_1", + "bg_sprite" : [0, 0], + "script" : [ + { + "speaker" : "Jisella", + "name_font" : "A", + "name_pos" : [20, 480], + "line_font" : "A", + "voice" : "Voice2", + "portrait" : null, + "line" : "So these are the legendary Crystal Mountains, huh? Doesn't look so bad from here.", + "characters" : [ + { + "name" : "jisella", + "flipped" : true, + "pos" : [70, 118], + "actor" : [ + { "sheet" : "base", "sprite" : [0, 0] }, + { "sheet" : "eyes", "sprite" : [1, 2] }, + { "sheet" : "mouth", "sprite" : [0, 0] }, + { "sheet" : "brows", "sprite" : [0, 0] } + ] + } + ], + "effects" : [ ] + }, + { + "speaker" : "Bidru", + "name_font" : "A", + "name_pos" : [20, 480], + "line_font" : "A", + "voice" : "Voice1", + "portrait" : null, + "line" : "Be not decieved, miss Jisella. This is a treacherous place. Many unwary travellers have met their ends in these mountains!", + "characters" : [ ], + "effects" : [ ] + }, + { + "speaker" : "", + "name_font" : "A", + "name_pos" : [20, 480], + "line_font" : "A", + "voice" : null, + "portrait" : null, + "line" : "", + "characters" : [ ], + "effects" : [ + { + "call" : "ef_game_switch_mode", + "data" : ["Battle_Mode", "testmap1"] + } + ] + } + ] +} diff --git a/src/base.py b/src/base.py @@ -9,6 +9,7 @@ from .constants import * # This file contains: # 1. The BaseManager class, which controls entities in the base and the UI in base mode (e.g. cursor) # 2. Various entity subclasses used in base mode +# 3. Various base mode UI elements ################################# # Section 1 - BaseManager class # @@ -65,3 +66,13 @@ class BaseManager(manager.Manager): if self.game.control_mode == CTRL_MODES.Base_Normal: self.tile_cursor.update(surface) self.base_entities.update(surface) + +################################################### +# Section 2 - Various Base Mode Entity Subclasses # +################################################### + +#################################################### +# Section 3 - Various Base Mode UI Element Classes # +#################################################### + +#class diff --git a/src/scene.py b/src/scene.py @@ -151,11 +151,13 @@ class StillScene(object): """ # First, clear up and prepare self.displayed_strings = [""] + self.continue_ready = False self.rendered_text_surfaces = [None] self.rendered_name = None self.rendered_name_topleft = (0, 0) self.current_portrait = None self.current_portrait_rect = None + self.current_text_char_index = 0 self.line_number = 0 self.current_line_starting_index = 0 self.displayed_characters = []