Jump to content

The Lion Throne (Fangame and Engine)


rainlash
 Share

Recommended Posts

So, after seeing this, I decided to start working on a short hack with Lex Talionis, using your tutorial as a guide. However, when I tried opening the Level Editor to spawn some enemies, I ran into an issue. Instead of opening the editor, the command window simply gave me a Python error message - which I couldn't read or capture, as the window immediately closed. So, I'm left with a project I can't work on and a Level Editor that refuses to let me use it. Could you help me figure out how to fix the Level Editor, or at least see what the error message even is?

 

Thank you for your help!

Link to comment
Share on other sites

  • Replies 459
  • Created
  • Last Reply

Top Posters In This Topic

Hi, I'm on Mac and tried manually setting up Lex Talionis, as such I installed git and pygame. My problem is that (as you predicted) python3 has issues running the game (it says a dictionary's size changed during iteration) but python2 can't find the pygame module to import it, do you have any tips on how to fix this?

EDIT: fixed it, if anyone encounters this same problem send me a PM and I may be able to help you; btw Rainslash a python engine for fire emblem games is like a dream come true, I can't wait until I learn more about Python coding to start messing around with this, massive props to you!

Edited by Koumal8
Link to comment
Share on other sites

A couple of people have run into bugs using the newest version of the Engine. Specifically if they had a unit defined in the units.xml without any items in their inventory, or if they wanted to use the preloaded_levels.xml to load up their levels for testing. Thanks for all the bug reports! There's a new version 0.9.0.1 of both the Engine and the Level Editor in the usual place that has many of these bugs fixed. Try downloading it if you run into any trouble. 

I forgot to mention in the last message that there is a new effect in the Data/Effects/Anima/ directory that is used to display the turnwheel's animation ("TurnwheelFlash"). You'll need the effect in order to run the animation. Also, the format of Saves/progress_log.xml has changed with version 0.9.0.1. The old format should work, but you may run into weird issues...

As a sidenote, if you run either of the executables from a command prompt, even if the executables crash, their error messages will still be displayed. So I recommend running the executables this way while you are developing.

Edited by rainlash
Link to comment
Share on other sites

On 6/17/2019 at 9:57 PM, rainlash said:

MODEDIT: snip

 Oh man, How long I've been waiting for the supports!! Now (with your tutoring on private messages) I will be able to realize how to emulate FE4 changes depending on supports between characters... Great job so far, keep it this way and soon you'll be uploading the v1.0.0

 

By the way, it would be useful for newcomers that you update the main page, it still says v0.8.9 instead of v0.9.0.1 that would be the current version if I'm not wrong.

 

MODEDIT: yo don't doublepost

Edited by Integrity
Link to comment
Share on other sites

On 6/18/2019 at 3:35 PM, RandomWizard said:

I'm left with a project I can't work on and a Level Editor that refuses to let me use it. Could you help me figure out how to fix the Level Editor, or at least see what the error message even is?

Are you using the downloaded version from Dropbox or the repository downloaded with Git Bash? I had a similar issue with the repository that I managed to fix, but I don't know if it carries over to the compiled .exe of the 0.9.0 Level Editor.

Link to comment
Share on other sites

31 minutes ago, VeryButter said:

Are you using the downloaded version from Dropbox or the repository downloaded with Git Bash? I had a similar issue with the repository that I managed to fix, but I don't know if it carries over to the compiled .exe of the 0.9.0 Level Editor.

I'm using the dropbox, but I've made pretty minimal changes. Just a few new characters (along with portraits) and a new Level0 map.

Link to comment
Share on other sites

55 minutes ago, RandomWizard said:

I'm using the dropbox, but I've made pretty minimal changes. Just a few new characters (along with portraits) and a new Level0 map.

Ah, I'm not sure then. Maybe redownloading the editor or updating to 0.9.0.1 will fix it if you haven't done either of those things already? (and also assuming you haven't fixed your issue yet)

Link to comment
Share on other sites

I've started playing through the new version, and it's apparent that there's a lot for me to do.  I've found one bug so far: During level ups, the ding sound doesn't play when stats increment.  I'm not sure what's wrong since the sound file is still there.

Link to comment
Share on other sites

I wasn't sure if just editing a post would bump or give notifications, so I apologize for double posting.  Anyway, I have a few questions:

- I can't seem to find any mention of them, so how do I set up battle music and boss crit kills?
- How do I check the remaining number of enemies, for things like keeping count in defeat enemy missions and playing near victory music?
- How do I check which character is visiting a house/village, for things like having the resident react differently to different characters?

Also, a house could be visited over and over if it wasn't closed after the first time.  It's fine in the GBA games since visiting there ended the character's turn, but it's not the case here so they could choose to visit again and again.  I haven't tested this in the current version, so I don't yet know if this behavior has changed.

Finally, I've found another bug.  A character can learn a feat after reaching a certain level (which is set to 8 unpromoted and 3 promoted in Lion Throne).  If they use a stat booster while still at that level, they can learn another feat.  I've done this only during base preps, so I don't know if it'll also happen in pre-chapter preps and during the actual chapter.

Link to comment
Share on other sites

Hello, I registered to say that I really like your engine, great work so far!!

With that said, I had a question:

Is it possible to have no battle music for some chapters? Like having the map bgm play during battles, like in some Fire Emblem Awakening chapters for example.

Again, great work 🙂

Link to comment
Share on other sites

9 hours ago, BBHood217 said:

I can't seem to find any mention of them, so how do I set up battle music and boss crit kills?

For battle music, there's a new button in the most recent version of the level editor labeled "Phase Music" just above the weather options. Click on that and a window will pop up where you can choose player phase and enemy phase battle music, in addition to the standard map music. Not sure about boss crit kills.

9 hours ago, BBHood217 said:

How do I check which character is visiting a house/village, for things like having the resident react differently to different characters?

You can have different dialogue in villages by adding something like this to the villageScript:

if;self.unit.name == 'Character X'
    [Unique dialogue for [character X]
elif;self.unit.name == 'Character Y'
    [Unique dialogue for [character Y]
else;
    [Generic dialogue that every other unit will use]
end

Not sure if there's a better way, but that's how I handle it, and it works well. the "self.unit.name" refers to the name of the unit visiting the village.

Edited by LuckyStart
Link to comment
Share on other sites

On 6/22/2019 at 4:26 AM, BBHood217 said:

I've started playing through the new version, and it's apparent that there's a lot for me to do.  I've found one bug so far: During level ups, the ding sound doesn't play when stats increment.  I'm not sure what's wrong since the sound file is still there.

Thanks for the bug report. This has been fixed in v0.9.1.

16 hours ago, BBHood217 said:

- I can't seem to find any mention of them, so how do I set up battle music and boss crit kills?

Like you say, battle music was added in v0.9.0. You can add it by clicking the Phase Music button on the Properties menu of the Level Editor. It will open up into this menu:

LevelEditorMusic.png.95140fc77732940f0d805d65794054f9.png

If you prefer not to use the Level Editor, you can set it in the overview.txt like so:

player_phase_music;Helms Deep
enemy_phase_music;In the Midst
player_battle_music;Fire Treasure
enemy_battle_music;Dragon Boy

If you leave Player Battle Music blank, no Battle Music should play.

Boss crit kills can be turned on with "boss_crit;1" in the Data/constants.ini file. Just add that line if there is not already a boss_crit line

16 hours ago, BBHood217 said:

How do I check the remaining number of enemies, for things like keeping count in defeat enemy missions and playing near victory music?

The gameStateObj keeps track of all the units in the game in a list: "gameStateObj.allunits". To check if the number of living enemy units on the level map is greater than 5 in an event script, you could do:

if;len([unit for unit in gameStateObj.allunits if unit.team == 'enemy' and unit.position]) > 5

To add it to an objective, try putting this in your Objective Display:

display_name;Kill Enemies,{len([u for u in gameStateObj.allunits if u.team == 'enemy' and unit.position])} left.

16 hours ago, BBHood217 said:

- How do I check which character is visiting a house/village, for things like having the resident react differently to different characters?

LuckyStart answered this one exactly the way I would do it. 

16 hours ago, BBHood217 said:

Also, a house could be visited over and over if it wasn't closed after the first time.  It's fine in the GBA games since visiting there ended the character's turn, but it's not the case here so they could choose to visit again and again.  I haven't tested this in the current version, so I don't yet know if this behavior has changed.

This is expected behaviour in the Lex Talionis Engine. You **must** manually close or turn off the house/village/unlockable/searchable event tile in the event script associated with it to prevent it from being used more than once. Otherwise, the event is still there and can still be accessed. You can remove all event tile properties from a tile with the "set_tile_info;{position_of_tile}" command. Look here: https://gitlab.com/rainlash/lex-talionis/wikis/A3.-Event-Commands#map-and-tile-change-commands under Change Event Tiles. There are many examples of this being done in the Lion Throne Data files.

16 hours ago, BBHood217 said:

Finally, I've found another bug.  A character can learn a feat after reaching a certain level (which is set to 8 unpromoted and 3 promoted in Lion Throne).  If they use a stat booster while still at that level, they can learn another feat.  I've done this only during base preps, so I don't know if it'll also happen in pre-chapter preps and during the actual chapter.

Thanks! This is definitely a bug. I changed the Leveling system in 0.9.0, so its expected that corner case bugs like this will pop up. I'll get it fixed for 0.9.1. I'll probably build and release 0.9.1 in a bit, once I finish my final testing. It's all small changes, so there shouldn't be much to update from the user's point of view.

Link to comment
Share on other sites

Sorry for the double post, but I'm unable to edit my previous post. One minor correction to the above. The actual way to get boss_crit is "boss_crit=1" not "boss_crit;1". I just had event scripts on my mind, I guess.

Link to comment
Share on other sites

Just recently finished a Lion Throne playthrough, and it was kinda tough to get Ophie's sword rank to A in time for the final chapter.  There are new wexp options to make gaining wexp easier, but I also got another idea.  Would it be possible to have a command to give wexp to a character, for things like arms scrolls and such?

Link to comment
Share on other sites

So, I ran into a couple of issues when testing out a couple maps I made with this. 1) My units aren't doubling on Enemy Phase even though they have been during Player Phase, and neither my units or the enemies have skills that would prevent that. 2) The Aid for my mounted units is way too low. Is there a way I can fix these?

Link to comment
Share on other sites

4 hours ago, PKLucky said:

So, I ran into a couple of issues when testing out a couple maps I made with this. 1) My units aren't doubling on Enemy Phase even though they have been during Player Phase, and neither my units or the enemies have skills that would prevent that. 2) The Aid for my mounted units is way too low. Is there a way I can fix these?

1.) The Lex Talionis engine, by default, does not allow doubling on enemy phase. This was done for game balance reasons in the The Lion Throne. You can easily turn doubling on enemy phase on by opening the constants.ini file in the data folder for your game and setting the constant "def_double" equal to 1 instead of 0.

2.) Similar to 1, the engine by default uses a different equation for calculating a mounted unit's aid than classic Fire Emblem. To change this, open the equations.txt file in your data folder and find the equation for '"RESCUE_AID."

By default, it's this: RESCUE_AID = max(0, 15 - CON) if 'Mounted' in unit.tags else max(0, CON - 1)

Change the 15 to a 25 to emulate GBA Fire Emblem: RESCUE_AID = max(0, 25 - CON) if 'Mounted' in unit.tags else max(0, CON - 1)

Hopefully that helps!

Link to comment
Share on other sites

Note that the Vantage skill allows doubling while defending, so it becomes rather useless when all defenders can double.  You could edit it to do something else, maybe even back to how it was in the original games.

Link to comment
Share on other sites

Got another issue, this time involving locked doors and chests. So, I have a door with the ID "Door" and here's what I typed up for it in the level's Unlock Script:

if;self.name == 'Door'
	hide_layer;4
	set_tile_info;o0,0
	layer_terrain;4;o0,0;Floor
end

I also have its Layer Terrain image in the LooseTilesFolder too. When I go to the door with a Skeleton Key, there's no option to unlock it. Am I missing something?

Link to comment
Share on other sites

2 hours ago, PKLucky said:

When I go to the door with a Skeleton Key, there's no option to unlock it.

Is the unlock tile for the door set on "Door" terrain initially?

In the 0.9.0 update, I believe skeleton keys, by default, only work on unlock tiles with "Door" or "Chest" terrain. So if you try to unlock a tile with "Wall" or some other type of terrain, there won't be an "Unlock" option to choose. 

If your unlock tile can't be on door terrain for whatever reason, you can allow Skeleton Keys to open that terrain. Open the items.xml file and find the entry for the Skeleton Key. There should be a <key> component that lists "Chest" and "Door". This is the list of terrain the key can open. Add the terrain you need to the list and you're all set.

If your unlock tile is set on door terrain and you still have this problem, I'm out of ideas. Hopefully that helps!

Link to comment
Share on other sites

I'm moving my stuff to v0.9, and I've hit a snag when trying to go directly to the debug level from the title screen:

Traceback (most recent call last):


  File "main.py", line 116, in <module>
  File "main.py", line 43, in main
  File "main.py", line 61, in run
  File "Code\StateMachine.py", line 198, in update
    input_output = self.state[-1].take_input(eventList, gameStateObj, metaDataObj)
  File "Code\Transitions.py", line 123, in take_input
    gameStateObj.build_new() # Make the gameStateObj ready for a new game
  File "Code\GameStateObj.py", line 149, in build_new
    self.overworld = Overworld.Overworld()
  File "Code\Overworld.py", line 404, in __init__
    self.locations = {location_data['level_id']: OverworldLocation(location_data) for location_data in GC.OVERWORLDDATA['Locations']}
KeyError: 'Locations'

It's looking for overworld things, but I have it disabled (overworld = 0 in constants.ini and overworld_data.txt is completely commented out).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...