Jump to content
rainlash

The Lion Throne (Fangame and Engine)

Recommended Posts

An update from yesterday:

I somehow managed to stop the error by creating a fake MapObject specifically for the Overworld sections. So now if you click anywhere on the map a generic options menu appears instead. Now I'm really curious to see how far I can get with this.

I gotta say this is some really malleable software you got. Nice work!

image.png.e82c02dbc13853e7c8ed453ca5a237bf.png

Spoiler
class OverWorldMap():
    """Create a 'map' of the overworld.
    This is a bandaid fix for overworld camera issues.
    """
    def __init__(self, overworld):
        self.width = overworld.width
        self.height = overworld.height
        self.weather = []

    def update(*args):
        pass

    def draw(*args):
        pass

 

 

Edited by TheeBill

Share this post


Link to post
Share on other sites

Hey there, So I'm making a few cool items and stuff, and everything is working quite well so far, but I was wondering:

Is it possible to make a weapon (We're talking about a sword here) which can be fought with like normal, but also be used through the items menu like a Vulnerary to heal the unit using it?

I got the Idea from Lucinas Parallel falchion (Which can be used the same way) So I tried to just fuse together a Vulnerary with a Sword, which created this horrible abomination:

    <item name="Blessed Gladitrua">
        <id>Blessed Gladitrua</id>
        <spritetype>Sword</spritetype>
        <spriteid>13</spriteid>       
        <components>weapon,weight,magic,crit,use_custom_anim,usable,beneficial,heal</components>
        <weapontype>Sword</weapontype>
 
        <RNG>1-4</RNG>
        <value>0</value>
        <weight>6</weight>
        <desc>Uses MAG to determine damage.</desc>

        <heal>20</heal>

        <MT>10</MT>
        <HIT>80</HIT>
        <LVL>Shirly</LVL>
        <crit>3</crit>
    </item>

The problem is simple, it doesn't work, It can't even be used through the item menu (Only Showing the Usual Equip and Discard Options)

I have been able to make the sword be usable outside of battle by removing the heal component, but then when I tell the unit to "Use" the Sword, they quite literally use the sword to attack themselves (Quite hilarious if I'm being honest, but not what I intended)

So yeah, any idea how I can do this? Maybe with status effects? I haven't really looked into those yet.

Thanks in advance ^^

Edited by Bastionb56

Share this post


Link to post
Share on other sites
9 hours ago, TheeBill said:

I somehow managed to stop the error by creating a fake MapObject specifically for the Overworld sections. So now if you click anywhere on the map a generic options menu appears instead. Now I'm really curious to see how far I can get with this.

Impressive work you've got so far! I took a look at what could be causing the bug and fixed the cameras map issue on my end. It's possible for the Overworld to exist irrespective of any specific level, but the camera did not expect that. The latest update to the git repo has a fix for the camera. 

I also have some comments on your overworld_data.txt. You may have already figured this out, but you're not using the routes correctly. You only need one route between each pair of nodes (so you need a route from 0 -> 1, but not also 1 -> 0). The direction of the routes is defined by the numpad directions (ie, 8 is up, 2 is down, 9 is to the topright). So having a route that is 8, then 2 like you showed yesterday doesn't make any sense. That route would be up then down, putting you back where you started. You also need to make sure the routes actually connect their nodes (probably -- the engine may handle this graciously). Try something like this (untested...):

# Level ID ; Location Name ; Icon Index ; Position
# The positions are multiplied by 8 for some reason.
# Everything is done on 1 to 8 basis in overworld
===Locations
0;Milthon Grove;0;63,40
1;Redrun Village;1;66,39
# Route connections (between level id's); Route (numpad)
===Routes
0,1;6,6,6,8
# Party ID must be integer -- I don't think this is true anymore; Party name (must be character)
===Parties
0;Randall

 

4 hours ago, Bastionb56 said:

Is it possible to make a weapon (We're talking about a sword here) which can be fought with like normal, but also be used through the items menu like a Vulnerary to heal the unit using it?

Not right now unfortunately -- but it's actually a really easy fix on my end. Items don't know whether they are being used or attacked with, but weapon aspect takes precedence over usable aspect, so your Sword was using it's weapon aspect on the unit. I added a single line that makes it so that the weapon aspect will not be used if the attacker and defender are the same unit (like when using an item). So now it will use the item aspect instead, and will behave like you expect it to.

Your item setup will work as you expect it to once you get the latest update to the Engine. I have pushed the change to the git repo, so if you use that, you can grab it. I don't know when the next build of the Windows executable will be completed -- I don't want to go through the build process for just one line of code change... But rest assured the next version will have your change.

Share this post


Link to post
Share on other sites
4 minutes ago, rainlash said:

Not right now unfortunately -- but it's actually a really easy fix on my end. Items don't know whether they are being used or attacked with, but weapon aspect takes precedence over usable aspect, so your Sword was using it's weapon aspect on the unit. I added a single line that makes it so that the weapon aspect will not be used if the attacker and defender are the same unit (like when using an item). So now it will use the item aspect instead, and will behave like you expect it to.

Your item setup will work as you expect it to once you get the latest update to the Engine. I have pushed the change to the git repo, so if you use that, you can grab it. I don't know when the next build of the Windows executable will be completed -- I don't want to go through the build process for just one line of code change... But rest assured the next version will have your change.

Thank you very much ^^

I have no experience with Python so I'll wait until the next executable is ready, I didn’t need the Sword right now anyway (it’s like a super late game thing... and I'm nowhere near making late game stuff) so no worries, just wanted to ask for if it was even possible, and I'm glad I did ^^

Maybe when I get a little more experience with coding in general, I'll switch to the git repo and code some stuff myself, but until I do that, I got a lot more work to do ^^"

Share this post


Link to post
Share on other sites
14 hours ago, rainlash said:

 The latest update to the git repo has a fix for the camera.

When I applied all your changes into my code I came across a similar error achieved the same way as before (I click anywhere on the map except Randall).

Spoiler

=== === === === === ===
Damn. Another bug 😞
Quick! Copy this error log and send it to rainlash!
Or send the file "Saves/debug.log.1" to rainlash!
Thank you!
=== === === === === ===

*** Lex Talionis Engine Version 0.9.3.16 ***
Main Crash 'NoneType' object has no attribute 'update'
Traceback (most recent call last):
  File "main.py", line 116, in <module>
    main()
  File "main.py", line 43, in main
    run(gameStateObj, metaDataObj)
  File "main.py", line 61, in run
    mapSurf, repeat = gameStateObj.stateMachine.update(eventList, gameStateObj, metaDataObj)
  File "C:\Users\anon\Github\lex-talionis\Code\StateMachine.py", line 198, in update
    update_output = self.state[-1].update(gameStateObj, metaDataObj)
  File "C:\Users\anon\Github\lex-talionis\Code\StateMachine.py", line 261, in update
    gameStateObj.map.update(gameStateObj)
AttributeError: 'NoneType' object has no attribute 'update'
=== === === === === ===
Damn. Another bug 😞
Quick! Copy this error log and send it to rainlash!
Or send the file "Saves/debug.log.1" to rainlash!
Thank you!
=== === === === === ===

I fixed this myself by just adding a simple check before it. Seems to work fine after.

Spoiler
    def update(self, gameStateObj, metaDataObj):
        # Animate!
        if self.show_map:
            gameStateObj.cameraOffset.update(gameStateObj)
            if gameStateObj.map:
                gameStateObj.map.update(gameStateObj)
            # Rest of the code here.

I added

if gameStateObj.map:

And placed it in StateMachine.py at line 261. Not sure if this will muck up anything anywhere else.

 

Now on to my next venture (and problem). I'll try to explain this as well as I can. It's not necessarily a bug on your end and is something that can only really be fixed on my end cause of my changes. I just need clarification on a few Engine attributes.

Spoiler

I'm trying to allow accessing the prepbase menu from the overworld option menu like so:

https://gyazo.com/b3617d24bc8129bb224346575709144c

But as you saw from the gif:

image.png.e04f0572bae6daa35897466948ca1004.png

The units don't display and this is because I'm pulling the party information from gameStateObj.overworld.parties[gameStateObj.overworld.last_party]

here's my most relevant code segment so you know what I mean:

Spoiler

        elif event == 'SELECT':
            selection = self.menu.getSelection()
            GC.SOUNDDICT['Select 1'].play()
            if selection == cf.WORDS['Prep Menu']:
            	# tbl refers to my own personal library of variable and functions.
              	# I'm just storing a variable there because this information seems to be wiped when exiting the OverworldState
                if tbl.true_last_party is None: #When first starting the overworld this will be None.
                    tbl.true_last_party = gameStateObj.overworld.parties[gameStateObj.overworld.last_party]
                gameStateObj.current_party = tbl.true_last_party
                go_to_base(tbl.true_last_party, gameStateObj, metaDataObj)
                gameStateObj.current_party = None # To prevent further crashes.

 

Basically there's no unit information in gameStateObj.overworld.parties[gameStateObj.overworld.last_party] despite it being an existing OverworldParty object. Why is that?

I guess the better question, how can I access the unit information without entering OverworldState?

I've recorded gameStateObj.current_party as sometimes None, an OverworldParty (when exiting OverworldState) or a str and different parts in the code and it confused the living hell out of me.

I apologize for the info dump. I wouldn't be surprised if you didn't really know what I was asking. I'm kinda bad at this stuff.

Share this post


Link to post
Share on other sites

Hey it's me again, I've been having some issues with animations.

I added a new class (called Harbringer) and put in all the animations as normal, but whenever the game would play any animation, it crashes on me with this error report:

pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Debug: 1
Version: v0.9.3.15
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: sBIT: invalid
Setting Seed 0
Controller: None
Setting Seed 808
=== === === === === ===
Damn. Another bug :(
Quick! Copy this error log and send it to rainlash!
Or send the file "Saves/debug.log.1" to rainlash!
Thank you!
=== === === === === ===

*** Lex Talionis Engine Version 0.9.3.15 ***
Main Crash 'script'
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 196, in update
    input_output = self.state[-1].take_input(eventList, gameStateObj, metaDataObj)
  File "Code\GeneralStates.py", line 1153, in take_input
    gameStateObj.combatInstance = Interaction.start_combat(gameStateObj, attacker, defender, gameStateObj.cursor.position, splash, attacker.getMainWeapon(), attacker.current_skill)
  File "Code\Interaction.py", line 64, in start_combat
    attacker_anim = GC.ANIMDICT.partake(attacker.klass, attacker.gender, item, magic, distance)
  File "Code\AnimationManager.py", line 97, in partake
    if not self.generate(klass):
  File "Code\AnimationManager.py", line 69, in generate
    default_script = self.directory[klass[:-1] + '0'][weapon]['script']
KeyError: 'script'

Created save point at last turn change! Select Continue in Main Menu to load!

=== === === === === ===
Damn. Another bug :(
Quick! Copy this error log and send it to rainlash!
Or send the file "Saves/debug.log.1" to rainlash!
Thank you!
=== === === === === ===

Script and Index files are present, along with the needed .png files, so I'm not sure what to do.

Share this post


Link to post
Share on other sites

Hey, I've been wanting to make an FE game/hack of my own for a while, and I figured that Lex Talionis would probably be easier than either paying for RPGMXP or waiting 50 years for FEXNA. But whenever I open the editor; whether it's compiled as an executable or not, I get a ton of errors before the editor window closes. As far as I know, I haven't seen a solution here, so I decided to make an account.
My apologies ahead of time if this is an easy fix and I'm just overlooking it.

Debug: 1
ERROR! No words.txt file found in the data directory.
Version: v0.9.3.18
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: sBIT: invalid
Setting Seed 0
DLL load failed while importing manhattan_sphere: The parameter is incorrect.
Fast manhattan sphere generation not available. Falling back on default Python implementation.
DLL load failed while importing LOS: The parameter is incorrect.
Fast line of sight calculation not available. Falling back on default Python implementation.
DLL load failed while importing fast_pathfinding: The parameter is incorrect.
Fast pathfinding not available. Falling back on default Python implementation.

This is where the map animation key errors appear. I'll skip that.

Traceback (most recent call last):
  File "LevelEditor.py", line 21, in <module>
    from EditorCode import Autotiles
  File "C:\Users\(username)\Downloads\lex-talionis-master\Editor\EditorCode\Autotiles.py", line 7, in <module>
    from PIL import Image
ModuleNotFoundError: No module named 'PIL'

Again, if this has been solved before, I'm sorry. Have a nice weekend.

Share this post


Link to post
Share on other sites
Debug: 1
ERROR! No words.txt file found in the data directory.
Version: v0.9.3.18
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: sBIT: invalid
Setting Seed 0
DLL load failed while importing manhattan_sphere: The parameter is incorrect.
Fast manhattan sphere generation not available. Falling back on default Python implementation.
DLL load failed while importing LOS: The parameter is incorrect.
Fast line of sight calculation not available. Falling back on default Python implementation.
DLL load failed while importing fast_pathfinding: The parameter is incorrect.
Fast pathfinding not available. Falling back on default Python implementation.

As far as I know, these errors don't particularly matter (I get them too and everything works fine), though I'd wait for rainlash to get back to you on that.

Traceback (most recent call last):
  File "LevelEditor.py", line 21, in <module>
    from EditorCode import Autotiles
  File "C:\Users\(username)\Downloads\lex-talionis-master\Editor\EditorCode\Autotiles.py", line 7, in <module>
    from PIL import Image
ModuleNotFoundError: No module named 'PIL'

You need to install the 'pillow' package with pip in the command prompt. Try typing 'pip install pillow', 'python -m pip install pillow', or 'py -m pip install pillow'; whichever works. Once pillow is installed the Level Editor will run. Hope this helps!

Edited by ZessDynamite

Share this post


Link to post
Share on other sites
8 hours ago, ZessDynamite said:

You need to install the 'pillow' package with pip in the command prompt. Try typing 'pip install pillow', 'python -m pip install pillow', or 'py -m pip install pillow'; whichever works. Once pillow is installed the Level Editor will run. Hope this helps!

This is correct. Although you shouldn't receive this error if you are using the Level Editor executable version. PIL/pillow comes included with the executable.

8 hours ago, ZessDynamite said:

As far as I know, these errors don't particularly matter (I get them too and everything works fine), though I'd wait for rainlash to get back to you on that.

These errors only kind of matter, although I'm wondering why you seem to get them. Basically, while the 99% of the Engine is pure Python, I found that for some very CPU intensive functions, pure Python wasn't always fast enough (think, pathfinding and line of sight calculations). So I wrote some Cython modules: compiled C code that Python calls. If, for some reason, your computer can't use the C code, that is weird. Likely, you either have a completely different version of Python or you are not using Windows.

But, it doesn't really matter, because as you can tell, the Engine will fall back on the old pure python implementations, which works fine, just a little slower.

Share this post


Link to post
Share on other sites

Okay! Thanks guys. I don't quite know why I'm getting the C code errors. I'm using Windows and have the most recent version of Python installed.
Anyways, I installed pillow and it finally opened, hurrah! I was stuck on this for hours, and what do you know, it was as easy as slapping something into the terminal.

Share this post


Link to post
Share on other sites

Heya, just here to report a bug I've been having for some time now, it seems that setting up a combat event in the outro script will result in the entire rest of the script being completely skipped with no way to stop it, I have no idea why this happens, it works fine during the intro script, where everything happens as it is supposed to. (Sidenote, the combat interaction it self works without a problem, but nothing else after it will be played and the game will immeadiatly go to the save screen and then the next chapter.)

This is the part of the outro script where the bug occurs, but it's just a standard interact script.

        add_unit;Alice;10,15;warp
        u;Alice;Left
        s;Alice;Not on my watch!
        r;Alice
        wait;50
        interact_unit;Alice;Bandit1;Crit
        wait;300
        end_skip

I wish I could provide more information, but that's all I got. Hope it helps somehow ^^

Edited by Bastionb56
"Outra Script"

Share this post


Link to post
Share on other sites
On 3/24/2020 at 2:53 PM, Bastionb56 said:

Heya, just here to report a bug I've been having for some time now, it seems that setting up a combat event in the outro script will result in the entire rest of the script being completely skipped with no way to stop it, I have no idea why this happens, it works fine during the intro script, where everything happens as it is supposed to.

Hey thanks for the bug report! I think somebody else actually ran into this issue before, but your report crystallized the issue and helped me understand the problem.

The problem is that whenever any event script ends and the game is in the win state ("win_game" has been called), the outroScript for that level is called. Makes sense right? Well, an outroScript itself also ends at some point, and you would end up with an infinite loop of outroScript ending and then calling outroScript. So a flag is set right before the first outroScript is called -- outroScriptDone flag. Now when the first outroScript finishes up (or any event script), the engine checks whether this is set and if so, proceeds to save screen and the next chapter. So when your interactScript ends, the engine checks whether outroScriptDone has been set, and seeing that it has and outroScript should be therefore be done, leaves the level. This is the issue you've run into. So I've got two solutions:

Solution 1:

This solution does not require you to update to a new version of the Engine, but is gloriously hacky! 

# At the beginning of the outroScript
if;not gameStateObj.level_constants['outroStarted']
	# Set this level constant so this section is not repeated when we repeat the outroScript
	set_level_constant;outroStarted
	add_unit;Alice;10,15;warp
	u;Alice;Left
	s;Alice;Not on my watch!
	r;Alice
	wait;50
	# Make it so that we can repeat the outroScript by turning off the flag (as if we've never reached the outroScript yet)
	# This is tremendously hacky
	if;gameStateObj.statedict.update({'outroScriptDone': False})
		wait;1  # We just need the Engine to parse our if statement and change the flag to False
	end
	interact_unit;Alice;Bandit1;Crit
end
wait;300
end_skip

Yes, we're using an if statement to convince the Engine that it hasn't done the outroScript yet, making the Engine repeat the outroScript, and then making sure it skips the sections its already done. 

Solution 2:

Wait for me to update the Engine. I plan to change the Engine so that a level won't actually end unless an outroScript itself finishes (as long as one exists for the level). This is the less fun but probably better solution.

Hopefully that explains why you ran into the issue. It was kind of complicated for me to figure out on my end -- some of the code involving the outroScript is like 6 years old...

Share this post


Link to post
Share on other sites

Is there a way to impose a limit on stealing?  Like the thief can only steal an item if their con is equal to or greater than the item's weight?  Or perhaps a skill that protects whoever has it from all stealing attempts?

Share this post


Link to post
Share on other sites
41 minutes ago, BBHood217 said:

Is there a way to impose a limit on stealing?  Like the thief can only steal an item if their con is equal to or greater than the item's weight?  Or perhaps a skill that protects whoever has it from all stealing attempts?

There's no way to have a thief only steal an item if their con is equal to or greater than the item's weight. Right now the only item discrimination that is made in the steal routine is whether you have the steal constant set to 0 or 1 (0 for GBA style, and 1 for the Lion Throne style).

But you can make a unit immune to having their items stolen. There are two equations defined in Data/equations.txt. STEAL_ATK and STEAL_DEF. If STEAL_ATK is greater than an enemy unit's STEAL_DEF then you can steal from that unit. Right now they both are set to be SPD, so that like normal Fire Emblem, if SPD is higher, you can steal. Just change STEAL_DEF to:

STEAL_DEF = 1000 if 'NoSwiping' in unit.tags else SPD

and then give the unit you wan't to be immune to stealing the NoSwiping tag (or you know, you can name the tag whatever you want). Hopefully that helps.

Share this post


Link to post
Share on other sites
On 3/21/2020 at 2:43 PM, rainlash said:

These errors only kind of matter, although I'm wondering why you seem to get them. Basically, while the 99% of the Engine is pure Python, I found that for some very CPU intensive functions, pure Python wasn't always fast enough (think, pathfinding and line of sight calculations). So I wrote some Cython modules: compiled C code that Python calls. If, for some reason, your computer can't use the C code, that is weird. Likely, you either have a completely different version of Python or you are not using Windows.

I didn't really think much of these messages either until I saw this. I'm getting something similar when running main.py

Spoiler

pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Debug: 1
Version: v0.9.3.16
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: sBIT: invalid
Setting Seed 0
DLL load failed: %1 is not a valid Win32 application.
Fast manhattan sphere generation not available. Falling back on default Python implementation.
DLL load failed: %1 is not a valid Win32 application.
Fast line of sight calculation not available. Falling back on default Python implementation.
DLL load failed: %1 is not a valid Win32 application.
Fast pathfinding not available. Falling back on default Python implementation.

What exactly is causing these messages? My OS is windows 10. Is %1 some sort of Linux holdover that is incompatible?

Share this post


Link to post
Share on other sites
4 hours ago, TheeBill said:

What exactly is causing these messages? My OS is windows 10. Is %1 some sort of Linux holdover that is incompatible?

I wish I could tell you more, but I honestly don't know. On both my machines that I test compatibility with, they are able to load the compiled C modules just fine. After doing some research, my understanding is that somewhere in your stack there is a 32-bit vs 64-bit mismatch. My OS is also Windows 10 (obviously 64-bit), my Python (3.7) is 64-bit, and the compiled C code is 64 bit. If you are using the executable version, that should all be the same and you should not run into any problems. If you are not using the executable version, maybe your version of Python is 32 bit?

But I honestly don't have a very good idea. Luckily its probably not a big deal. You'll run into speed issues if you have big auras or spells with line of sight, or greater than 15 movement, or the map gets too big (bigger than say 60 by 40), but otherwise everything should work fine.

Share this post


Link to post
Share on other sites
12 minutes ago, rainlash said:

maybe your version of Python is 32 bit?

Yea it is. I just checked. I guess I'll just have to deal with it then. Transferring from 32bit to 64bit at this point sounds too much like an unnecessary headache.

Thanks.

Share this post


Link to post
Share on other sites
On 4/5/2020 at 4:51 AM, rainlash said:

But you can make a unit immune to having their items stolen. There are two equations defined in Data/equations.txt. STEAL_ATK and STEAL_DEF. If STEAL_ATK is greater than an enemy unit's STEAL_DEF then you can steal from that unit. Right now they both are set to be SPD, so that like normal Fire Emblem, if SPD is higher, you can steal. Just change STEAL_DEF to:

STEAL_DEF = 1000 if 'NoSwiping' in unit.tags else SPD

and then give the unit you wan't to be immune to stealing the NoSwiping tag (or you know, you can name the tag whatever you want). Hopefully that helps.

It seems to work just fine.  But is there a way to make it check for a skill instead of a tag?

Share this post


Link to post
Share on other sites
4 hours ago, BBHood217 said:

It seems to work just fine.  But is there a way to make it check for a skill instead of a tag?

Assuming your skill's ID property is 'NoSwiping'

STEAL_DEF = 1000 if 'NoSwiping' in [s.id for s in unit.status_effects] else SPD

This also works (alternative way of writing the same thing):

STEAL_DEF = 1000 if any(s.id == 'NoSwiping' for s in unit.status_effects) else SPD

 

Assuming you gave a skill the component steal_immune (so you could have several different skills that share the steal_immune component)

STEAL_DEF = 1000 if any(s.steal_immune for s in unit.status_effects) else SPD

 

Share this post


Link to post
Share on other sites

I was wondering. What needs to be done to allow for this to run on a Mac? I've gotten to the point where, upon running "python3 main.py", 

╰─➤  python3 main.py                                                            
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Debug: 1
Version: v0.9.3.19
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: sBIT: invalid
Setting Seed 0
cannot import name 'manhattan_sphere' from 'Code' 
Fast manhattan sphere generation not available. Falling back on default Python implementation.
cannot import name 'LOS' from 'Code'
Fast line of sight calculation not available. Falling back on default Python implementation.
cannot import name 'fast_pathfinding' from 'Code' 
Fast pathfinding not available. Falling back on default Python implementation.
Controller: None

appears. Now, all that happens is that a pretty cheerful sound plays, which doesn't if I don't add the Audio folder into the file like the project mentions. What happens when I control-C is :

╰─➤  python3 main.py                                                             1 ↵
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Debug: 1
Version: v0.9.3.19
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: sBIT: invalid
Setting Seed 0
cannot import name 'manhattan_sphere' from 'Code' 
Fast manhattan sphere generation not available. Falling back on default Python implementation.
cannot import name 'LOS' from 'Code'
Fast line of sight calculation not available. Falling back on default Python implementation.
cannot import name 'fast_pathfinding' from 'Code' 
Fast pathfinding not available. Falling back on default Python implementation.
Controller: None
^CTraceback (most recent call last):
  File "main.py", line 122, in <module>
    main()
  File "main.py", line 44, in main
    run(gameStateObj, metaDataObj)
  File "main.py", line 82, in run
    gameStateObj.playtime += GC.FPSCLOCK.tick(GC.FPS)
KeyboardInterrupt

Is there some way to allow this to work on mac? Oh, and my python version is 3.8.2. 

 

EDIT: It seems that I may have not properly downloaded pygame. Installing miniconda before using pip instead of trying out different editions pip to install it seems to have fixed it. Haha.

Edited by CompleteNoob

Share this post


Link to post
Share on other sites

It seems that if one presses the INFO key while in the unit menu, it causes the came to freeze and crash, and gives out this error

 

  File “REDACTED” line 71, in take_input
    StateMachine.CustomObjects.handle_info_key(gameStateObj, metaDataObj, self.units[self.unit_index-1])
AttributeError: module 'Code.StateMachine' has no attribute 'CustomObjects

After importing CustomObjects, and changing line 71 from 

StateMachine.CustomObjects.handle_info_key(gameStateObj, metaDataObj, self.units[self.unit_index-1])

to

CustomObjects.handle_info_key(gameStateObj, metaDataObj, self.units[self.unit_index-1])

seems to have fixed it. This was done in the UnitMenu.py file.

This seems to be the sort of thing to post here. If not, could someone direct me to a better location? 

Edited by CompleteNoob

Share this post


Link to post
Share on other sites
9 hours ago, CompleteNoob said:

It seems that if one presses the INFO key while in the unit menu, it causes the came to freeze and crash, and gives out this error

Thanks for the bug report. It's now been fixed on the main git repo.

You should have also needed to import CustomObjects before your change works.

9 hours ago, CompleteNoob said:

This seems to be the sort of thing to post here. If not, could someone direct me to a better location

I guess the "official" place would be the Gitlab issues, but I honestly don't check that as much as I check here, so this is fine. You can also PM if its something small.

Share this post


Link to post
Share on other sites

Hey, really enjoying using the engine, but I have some questions.

  • Is it possible to have self inflicted damage after a use of a weapon or a combat art, and if so how would I go about that.
  • Also, is it possible to make it so that residual/overmap damage will not kill a unit and instead leave it at 1 HP in a similar vein to Fates/3H.

Share this post


Link to post
Share on other sites

Hi, I wanted to try out your engine following your tutorial on gitLab, and downloaded the version from the Git repository in case i want to break modify the code later on.

I tried opening the editor that comes with the git version, but it just crashes on launch and closes the console, so i don't know what causes this behaviour.

I decided to try the normal downloadable editor, which seems to work fine, but crashes whenever i try to load music.

Also,  when i start the game with main.py there is no sound, even with all the settings turned up.

Sadly i'm not too familiar with python so i can't describe the issues more precisely, but i dind't really change anything in the folders and i should have installed all the required components.

As far as i recall, everything worked fine with the executable version of the engine though.

 

Share this post


Link to post
Share on other sites
22 hours ago, Reyvadinvmax said:

Is it possible to have self inflicted damage after a use of a weapon or a combat art, and if so how would I go about that.

Not really. I incorporated the ability to make "devil axe" chance to kill oneself component, but no generic self damage component. This is on the todo list.

22 hours ago, Reyvadinvmax said:

Also, is it possible to make it so that residual/overmap damage will not kill a unit and instead leave it at 1 HP in a similar vein to Fates/3H.

No. I can consider adding this to the engine though.

 

7 hours ago, OnionBro said:

I tried opening the editor that comes with the git version, but it just crashes on launch and closes the console, so i don't know what causes this behaviour.

Do you have pyqt5 installed? Sometimes you also need regular Qt5 installed -- it seems to depend on how pyqt5 was installed on your system.

7 hours ago, OnionBro said:

I decided to try the normal downloadable editor, which seems to work fine, but crashes whenever i try to load music.

The editor might need the "Audio/music" and "Audio/sfx" folders to exist in order to load music correctly -- That's a bit of an oversight on my part but can you try adding those in?

7 hours ago, OnionBro said:

Also,  when i start the game with main.py there is no sound, even with all the settings turned up.

The Git repository does not come included with audio, since the audio for the Lion Throne game is over 100 MBs. You'll need to download that separately: https://www.dropbox.com/sh/slbz2t7v1fc6uao/AACiznGLm442qcdOAGbQtnmwa?dl=0

 

Share this post


Link to post
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.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...