0.9.7

Anything else to do with MoM IME
User avatar
Implode
Site Admin
Posts: 433
Joined: Fri Feb 24, 2006 3:35 am
Location: Newfoundland, Canada
Contact:

0.9.7

Post by Implode »

Work on 0.9.7 has been going really well, this is probably the first version where nearly everything is all new content and not just trying to get everything from the old Delphi version work again. Spells that add to other stats (e.g. Holy Armour) now work (though need to add realm restrictions, like Elemental Armour only working against certain types of attack), as well as crafting and using hero items.

I've now moved onto awarding treasure from capturing nodes/lairs/towers. I made a big post about this under Game Logic, about how treasure will be awarded differently in MoM IME than the original MoM and why, so go read/comment there if interested.

Once treasure is working, and hero items are totally polished off (the stats like +4 attack work already, but still need to make effects such as "Flaming" or "Holy Avenger" work, and a few other issues) then I'll put a new version out, hopefully before the end of the year. The AI will be later, in 0.9.7.1. Once that's done, it should start to actually be worth playing :D
User avatar
Implode
Site Admin
Posts: 433
Joined: Fri Feb 24, 2006 3:35 am
Location: Newfoundland, Canada
Contact:

Re: 0.9.7

Post by Implode »

Been testing 0.9.7.0 for the last few days, fixed a bunch of minor things but generally it seems good and stable, so have released this, can download it from the usual place on Sourceforge :) It now needs Java 8, so may need to update your JRE to run it.
User avatar
Implode
Site Admin
Posts: 433
Joined: Fri Feb 24, 2006 3:35 am
Location: Newfoundland, Canada
Contact:

Re: 0.9.7

Post by Implode »

Ugh I found one significant bug already - if you capture a strong enough node/lair/tower to be awarded a special (book/retort) then it crashes out. Will wait a day or two to see if I can find any more problems before I do another build to fix this.
User avatar
Implode
Site Admin
Posts: 433
Joined: Fri Feb 24, 2006 3:35 am
Location: Newfoundland, Canada
Contact:

Re: 0.9.7

Post by Implode »

Ok that bug about crashing if the game awards you a special in treasure rewards was awful (because that's exactly the reward you're hoping for!) so did a new build 0.9.7.1 to fix this and a few other minor things I'd spotted while testing it. Also made Housing + Trade Goods settings work.
AndO3131
Posts: 5
Joined: Thu Jan 21, 2016 12:15 pm

Re: 0.9.7

Post by AndO3131 »

Hello. I'm an old fan of Master of Magic game and lately returned to playing it, but I've always wandered about bigger map and more opponents. I'm very happy to see that you're still working on this project. I've tried to run latest version (0.9.7.1) on my linux laptop and it works (good news)! Numerous options available during new game creation are marvellous.

I have a bit of knowledge about coding, so I've tried to compile the source from trunk. I managed to package the MoMIMEServer, but it doesn't start. I've tried to put it in a directory with 1.9.7.1 version along with other dependencies compiled, but no good. First error at startup is

Code: Select all

Exception in main method:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [../momime.common.spring/momime-common-beans.xml]
You know everything about the project, so I decided to ask for help. If I do get it to run, I'll post a guide.

Once again, thanks for all your work. Hope to see following versions.

Edit: Turns out I should also overwrite 'Original Master of Magic 1.31 rules.Master of Magic Server.xml', 'MoMIMEServerConfig.xml' and 'MoMIMEServerLogging.properties'. Server now starts normally.

Edit 2: A few tests failed, but I've managed to package client. It connects to server and starts a game. I've compiled version from trunk, so 'cities' screen is available 8)
User avatar
Implode
Site Admin
Posts: 433
Joined: Fri Feb 24, 2006 3:35 am
Location: Newfoundland, Canada
Contact:

Re: 0.9.7

Post by Implode »

It depends how you're building it. If you're literally going through each project building it on the command line with maven, then the assembly project sorts out all those MoMIMEServerConfig.xml and similar files. If you're just pulling the projects into Eclipse and running it manually, then the config files need copying from xxx-sample.yyy to just xxx.yyy and editing accordingly. The paths in the MoMIMEServerConfig-sample.xml are for the packaged version and won't work running it from within the project in Eclipse without some editing. Perhaps that's why you think you had to do something with "Original Master of Magic 1.31 rules.Master of Magic Server.xml" - you shouldn't have had to touch that.

e.g. my development MoMIMEServerConfig.xml looks like:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<config:momImeServerConfig xmlns:config="http://momime/server/config/v0_9_7">
	<portNumber>18250</portNumber>
	<userRegistryFilename>E:\Application Data\MoM IME server\MoM IME server user registry.xml</userRegistryFilename>
	<pathToServerXmlDatabases>W:\EclipseHome\SourceForge\MoMIMEServer\src\external\resources\momime.server.database</pathToServerXmlDatabases>
	<pathToSavedGames>E:\Application Data\MoM IME server\savedGames</pathToSavedGames>
	<savePointKeepCount>16</savePointKeepCount>
</config:momImeServerConfig>
So pathToServerXmlDatabases points to the location of "Original Master of Magic 1.31 rules.Master of Magic Server.xml" where it is checked out, and the other two paths point to someplace away from your Eclipse workspace altogether. Similarly in the client config, graphicsXmlFilename and pathToLanguageXmlFiles need to point to the relevant places under src/external/resources where they are checked out.
AndO3131
Posts: 5
Joined: Thu Jan 21, 2016 12:15 pm

Re: 0.9.7

Post by AndO3131 »

Most importantly it works :P

Compilation goes smoothly, however I've had a few errors during tests. I've fixed most of these errors, but had to remove 2 test files. I could try to make a diff, but I haven't used subversion. Have you considered using github? I've used it to write some small code in OpenXcom (my branches are here). Git is excellent for open source software, because it's very easy to make a fork of somebody else's repository and work on your own copy.
User avatar
Implode
Site Admin
Posts: 433
Joined: Fri Feb 24, 2006 3:35 am
Location: Newfoundland, Canada
Contact:

Re: 0.9.7

Post by Implode »

I've seen enough of git to know that I don't really like it :) I mean individuals forking your repository and making their own useful changes doesn't benefit the open source project if those changes don't get pushed back to the main repository. Also have only seen using it on the command line which is horrid (I mean who would actually use command line SVN to make branches and such instead of using TortoiseSVN to do it with a nice UI... I've not seen a similar nice UI for git yet but didn't look very hard... I was told not to use TortoiseGIT as it hides a lot of the interesting features).

What tests needed fixing and how? I had tested running the built app on linux before, but not building it. You could always email me updated files and I'll check them in.
AndO3131
Posts: 5
Joined: Thu Jan 21, 2016 12:15 pm

Re: 0.9.7

Post by AndO3131 »

I understand your point ;) I'm not sure if I will contribute something important to your project, because I have very small experience with java and with server-client programs. I will try to make right-click center the map and we will see from there.

Regarding tests, I've put svn diff files on dropbox:

1. NdgUtils - backslashes are not treated as folder separator in linux, so I suggest changes in file 'NdgUtils_patch_linux.diff'

2. MoMIMEServer - I received an error while searching for 'Original Master of Magic 1.31 rules.Master of Magic Server.xml'. Suggested changes are in 'MoMIMEServer_patch_linux.diff'

3. MoMIMEClient - Most test errors happen here (but packaged jar works fine :lol: ).
a) encoding and special character \00BD - I suggest changes as in 'MoMIMEClient_patch_linux.diff', maybe add encoding to project properties (my build 'chose' UTF-8 encoding automatically)?

b) MoMIMEClient/src/test/java/momime/client/utils/TestTextUtilsImpl.java produces an error in those lines

Code: Select all

		assertEquals ("1,234", utils.intToStrCommas (1234));
		assertEquals ("12,345", utils.intToStrCommas (12345));
		assertEquals ("123,456", utils.intToStrCommas (123456));
		assertEquals ("1,234,567", utils.intToStrCommas (1234567));
		assertEquals ("-1,234", utils.intToStrCommas (-1234));
Problem is caused by 'DecimalFormat' type used in 'MoMIMEClient/src/main/java/momime/client/utils/TextUtilsImpl.java' - DecimalFormat uses default locale, and for example in my language (polish) comma[,] isn't used as a number separator. I've just commented those lines, I think this is just for display purposes.

c) src/test/java/momime/client/utils/TestAnimationControllerImpl.java gives an error

Code: Select all

TestAnimationControllerImpl.testLoadImageOrAnimationFrame_Anim:153 expected:<0123012301[]> but was:<0123012301[2]>
d) I removed files 'momime/client/ui/frames/TestOptionsUI.java'

Code: Select all

Tests in error: 
  TestOptionsUI.testOptionsUI:148 » NullPointer
e) I removed file 'momime/client/utils/TestResourceValueClientUtilsImpl.java'.

Code: Select all

testGenerateUpkeepImage_WithTens(momime.client.utils.TestResourceValueClientUtilsImpl)  Time elapsed: 5.457 sec  <<< FAILURE!
java.lang.AssertionError: expected:<21> but was:<19>
	at momime.client.utils.TestResourceValueClientUtilsImpl.checkImage(TestResourceValueClientUtilsImpl.java:456)
	at momime.client.utils.TestResourceValueClientUtilsImpl.testGenerateUpkeepImage_WithTens(TestResourceValueClientUtilsImpl.java:437)

testGenerateUpkeepImage_WithoutTens(momime.client.utils.TestResourceValueClientUtilsImpl)  Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: expected:<39> but was:<37>
	at momime.client.utils.TestResourceValueClientUtilsImpl.checkImage(TestResourceValueClientUtilsImpl.java:456)
	at momime.client.utils.TestResourceValueClientUtilsImpl.testGenerateUpkeepImage_WithoutTens(TestResourceValueClientUtilsImpl.java:310)
Error is related to 'half' in upkeep image. Don't know what exactly should I repair here.
User avatar
Implode
Site Admin
Posts: 433
Joined: Fri Feb 24, 2006 3:35 am
Location: Newfoundland, Canada
Contact:

Re: 0.9.7

Post by Implode »

Ok so I went through as much of this as I could, and thanks for taking the time to do this, its useful to help me improve things and know what to do better :)

1) Added into the parent pom to set the source file encoding correctly. As you said, the problem is your build chooses UTF-8 automatically. That should fix all the issues with the "half" symbols in the client code. So didn't need your patch file there. Note nothing uses the new snapshot of the parent pom so this won't be fixed immediately - I'll link that in when I do the next build (in a few weeks).
2) Fixed up FileNameTestUtils to use platform-independant separators (I'd modified the code a while back to use platform-independant separators ... but guess I missed the unit tests). One method didn't even need to be there so removed it.
3) I should have mentioned - if you let the unit tests for the Client run, must avoid doing anything else on your comp at the time. All of the data setup to display the UIs is mocked - actions such as clicks and mouse overs are not - sometimes if you as much as drag the mouse across one of the UI windows when the tests run, an exception will be thrown and may fail the test.
4) I don't understand the change in your patch file for ServerTestData.java - what error were you getting? Putting .parent() on and removing one "../" is effectively the same thing. I suspect the real reason why this fixed it for you is because it is then using a different constructor - new File (String, String) vs new File (File, String), and if you'd just put .toString () on the first param that would also have worked. But I'd like to understand why you have an error there in the first place... (there'd be a lot of places to fix if there is an issue there).

Thanks!
Nigel.
AndO3131
Posts: 5
Joined: Thu Jan 21, 2016 12:15 pm

Re: 0.9.7

Post by AndO3131 »

I haven't tried out your changes yet. However, I did implement simple idea of right-click on main screen center the map. Try out this patch file on dropbox and let me know, if it's any good.
piratep2r
Posts: 3
Joined: Wed Feb 10, 2016 7:56 pm

Re: 0.9.7

Post by piratep2r »

Hello Implode,

First, thanks for doing this; it is really inspiring, and it seems clear to me that you are closing in on something -amazing-.

Four observations after a few hours playing vs AI. (Note, I looked for some info on known bugs, but found little here on the forum).

1. Combat AI seems a bit odd - it's been a while, but I remember enemies acting smarter in combat; in my game enemy ground units would walk around blocking ground units to get at archers, and would NEVER attack the blocking units (which would usually annihilate them the following turn). I *think* this is different from vanilla MOM, but am not sure.

2. Casting plane shifting failed to shift my units, and I am pretty sure (but not 100% positive) that it would have been a legal land-->land move. Bug? Feature not in yet? Or operator error?

3. I really struggled figuring out what was going on with my overland spell casting; it is possible right now (as you surely know) to "stack up" casting spells by clicking on them repeatedly, and I found no acknowledgement anywhere that you had successfully "ordered" a spell, or any way to see what the "casting spell laundry list" was. This meant me accidentally casting guardian spirit 5 times in a row because I was certain I had miss-clicked. It seemed to me that the "top" spell on the list *would* show up *next turn* on your "currently casting" view, but not on the turn I ordered it, leading to hilarious confusion (and no MP).

4. I couldn't build roads with high men engineers. Presumably this feature is not in yet.

You probably know about all of these issues, but I posted the list in case any of it was news to you. And to thank you, I am so excited about IME MOM!

-P2r
User avatar
Implode
Site Admin
Posts: 433
Joined: Fri Feb 24, 2006 3:35 am
Location: Newfoundland, Canada
Contact:

Re: 0.9.7

Post by Implode »

P2r,

Thanks for the feedback :)

1) Combat AI - yeah that's kind of intentional, the AI will always try to take out units with remaining ranged attacks first, so that they don't get to use those ranged attacks.

2) The only way to move between planes at the moment is at towers. Plane Shift/Travel spells and the innate Plane Shift ability (e.g. on Shadow Demons) don't work yet.

3) F3 shows you queued overland spells, what's missing from that screen is that you should be able to click on queued spells to cancel them, which I didn't add yet. I agree the fact that the only acknowledgement you get that you cast a spell is the spell book closing isn't overly helpful, but its exactly what the original MoM did, so I'd welcome suggestions here. I don't just want to pop up a message box saying "Ok, you will now start casting Guardian Spirit", that'd just look awful.

4) There's no roads yet (either generated at start or the ability to build them yourself).

Thanks very much,
Nigel.
piratep2r
Posts: 3
Joined: Wed Feb 10, 2016 7:56 pm

Re: 0.9.7

Post by piratep2r »

Asking for suggestions from strangers on the internets; you play a dangerous game, Implode ;)

The simplest solution I can think of that is still pretty attractive is as follows.

In original MOM, when a spell was actively being cast, it would glow and pulse in the spellbook.

https://youtu.be/yhtULAD1hic?t=273

Using this concept, the proposed flow to cast a spell:
Open book
Click on spell
Be sent back to book, but now spell is both highlighted(glow) and pulsing
"Current casting" (in magic tab) immediately displays cast spell (if multi-turn)
Click the exit book tab to exit book.

Current flow (IIRC):
Open book
Click on spell
Be sent back to overland map
"current casting" displays nothing until following tun (if multi-turn)
Spell not highlighted or pulsing if returning to book.

Obviously, my thoughts on this matter are worth what you paid for them!

Edit: addition: obviously this does nothing to resolve confusion as to queued spells, but I see little benefit in queuing. However, since you probably feel it is important, I bet there is a nice and simple workaround (perhaps another page at the beginning of the spell book called simply "cast spell queue" with a ETA to casting (in turns)).
User avatar
Implode
Site Admin
Posts: 433
Joined: Fri Feb 24, 2006 3:35 am
Location: Newfoundland, Canada
Contact:

Re: 0.9.7

Post by Implode »

Ok I think first I need to figure out what's going on with the way you're describing "currently casting" not showing up until the next turn, that's really not supposed to be like that... I'll think about the spellbook itself after.

Not much left to do before I can get 0.9.7.2 built so I don't really want to take on additional stuff at this point.
Post Reply