ToME 2 maintenance

Everything about ToME 2.x.x. No spoilers, please

Moderator: Moderator

Message
Author
overtrix
Archmage
Posts: 412
Joined: Fri Jan 17, 2003 9:33 am
Location: Les Corbières sauvages

Re: ToME 2 maintenance

#31 Post by overtrix »

Not a moan ! ...

Have a mind that some large percentage of the folk who play ToME are never going to build anything from anything with anything computer-related. If it's not available as an application which one downloads and then runs, for them (okay then hands up, us :)) it might as well not exist. Ye all put in mammoth amounts of time for nerry a shilling. That much is forever clear.

... not a moan !

Shoob
Reaper
Posts: 1535
Joined: Mon Jan 22, 2007 6:31 pm
Location: East of the sun, west of the moon

Re: ToME 2 maintenance

#32 Post by Shoob »

keep in mind also that this will keep on being updated (at least till all the bugs are straightened out), so even though the current version is 2.3.8 (unofficially) there needs to at least be someone to compile a windows version if there is a change, as most people playing tome play on windows (probably). they cant just be ignored. which is why I wanted to try to compile it even though there already is one, so I could do it later... so my challenge would be *do* a windows compile for each (unofficial) release (and a linux and mac too). sources are good, but not everybody know how to do them.
Oliphant am I, and I never lie.

madmonk
Reaper
Posts: 2257
Joined: Wed Dec 12, 2007 12:21 am
Location: New Zealand

Re: ToME 2 maintenance

#33 Post by madmonk »

Shoob wrote:keep in mind also that this will keep on being updated (at least till all the bugs are straightened out), so even though the current version is 2.3.8 (unofficially) there needs to at least be someone to compile a windows version if there is a change, as most people playing tome play on windows (probably). they cant just be ignored. which is why I wanted to try to compile it even though there already is one, so I could do it later... so my challenge would be *do* a windows compile for each (unofficial) release (and a linux and mac too). sources are good, but not everybody know how to do them.
More importantly...

(Sorry for shouting)

MAKE SURE IT IS DOCUMENTED!!!!!!!!!

And well advertised....
Regards

Jon.

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#34 Post by AnonymousHero »

Could anyone who's actually managed to get it tome compile on Windows add some detailed instructions to wiki page? (Or update the page, or whatever)

FWIW, I agree that the building.txt needs to be expanded greatly, but I don't have access to Windows, so...

bio_hazard
Wyrmic
Posts: 233
Joined: Thu Dec 20, 2007 12:08 am
Location: California

Re: ToME 2 maintenance

#35 Post by bio_hazard »

If there's any chance of an OSX executable of the update, I would play it.

escapee
Posts: 4
Joined: Sat Apr 03, 2010 6:04 am

Re: ToME 2 maintenance

#36 Post by escapee »

I managed to build it on windows. All I had to do was install git and cmake, I already had mingw installed for a while. From there just run the commands listed in building.txt.

I'm not sure what someone would need to know coming at this as a newbie. I think the only thing I had to do manually was add mingw's bin location to my PATH. You can google how to edit the PATH environment variable, it's simple.

morchant
Posts: 1
Joined: Mon May 03, 2010 10:05 am

Re: ToME 2 maintenance

#37 Post by morchant »

Hi at all. I enjoyed playing ToME for a while now after starting with Angband a while ago.
One thing I noticed for the git version is that it does not enable the gtk2 interface. I always prefered it over the x11 interface (it has scrollbars). I am not very comfortable with cmake. Any hints on howto enable gtk2?


***WARNING: The following discusses bugs in the code and thus is inherently (a bit) spoily ***

I also found some bugs in the display of mimicry shapeshift skills. Maybe this can be updated at least for the git version. I did not know where to put them so I just post it here.





1. The duration of the shapeshift power is not printed correctly. This one is pretty clear. I did not manage to attach the patch file so it is just included in the text:

Code: Select all

--- cmd7.c	2010-05-03 12:13:14.942367986 +0200
+++ cmd7.c	2010-05-03 12:15:34.239005668 +0200
@@ -92,7 +92,7 @@
 	switch (power)
 	{
 	case 0:
-		strnfmt(p, 80, " dur %d", k_info[o_ptr->k_idx].pval2 + get_skill_scale(SKILL_MIMICRY, 70));
+		strnfmt(p, 80, " dur %d", k_info[o_ptr->k_idx].pval2 + get_skill_scale(SKILL_MIMICRY, 1000));
 		break;
 	case 1:
 		strnfmt(p, 80, " dur %d+d20", 10 + plev);
Notice that this is only a display error. Ingame the result is correct. Probably it was changed in the other place and forgotten here.

2. I also noticed that mimicry shapeshifting is a bit weird in respect to failures (and display of them). You might or might not consider this as a bug - and I do not have a clean solution for this. There are two sources of fail:
(i) The mimicry skill can fail. If this happens you don't even try to shapeshift and you might suffer from side effects such as stunning ...
(ii) If (i) succeeded the shapeshift can fail - turning you into an abomination in the process.
The game only displays the failure rate for case (i). The failure rate for case (ii) is hidden (though it can be estimated ingame without risk by trying a lot of times in town).
Very likely if you have half-decent dexterity failure rate (i) will be very low. Since (i) is displayed this might make you believe that it is safe to shapeshift when it is not. I wondered for a very long time why my shapeshifts went wrong so often despite my failure rate being at 1 or 2 percent.

I think the game should display the second failure rate (here you might disagree). I made a quick dirty hack such that the game now displays the combined failure rate of (i) and (ii). I must warn you that I am not very good at C programming and it is poorly tested though.

Code: Select all

--- cmd7.c 2010-05-03 12:15:34.239005668 +0200
+++ cmd7.c      2010-05-03 12:37:45.078887502 +0200
@@ -109,6 +109,28 @@
        }
 }

+static int get_mimic_chance(int mimic)
+{
+       s32b chance;
+
+       call_lua("get_mimic_info", "(d,s)", "d", mimic, "level", &chance);
+       chance *= 3;
+
+       chance -= get_skill_scale(SKILL_MIMICRY, 150);
+       chance -= 3 * adj_mag_stat[p_ptr->stat_ind[A_DEX]];
+
+       if (chance < 2) chance = 2;
+
+       /* Stunning makes spells harder */
+       if (p_ptr->stun > 50) chance += 25;
+       else if (p_ptr->stun) chance += 15;
+
+       /* Always a 5 percent chance of working */
+       if (chance > 95) chance = 95;
+
+       /* Return the chance */
+       return (chance);
+}

 /*
  * Allow user to choose a magic power.
@@ -248,6 +270,19 @@
                                        /* Always a 5 percent chance of working */
                                        if (chance > 95) chance = 95;

+                                       /* HACK: Display 'right' fail for mimicry shapeshift fail including the abomination failure */
+                                       if (!(strcmp(spell.name,"Mimic"))&&(!p_ptr->mimic_form))
+                                       {
+                                               object_type     *o_ptr;
+                                               int mimic_fail = 0;
+                                               o_ptr = &p_ptr->inventory[INVEN_OUTER];
+                                               if ((o_ptr->tval != TV_CLOAK) || (o_ptr->sval != SV_MIMIC_CLOAK)) mimic_fail = 100;
+                                               else mimic_fail = get_mimic_chance(o_ptr->pval2);
+                                               chance = 100 - (100-chance)*(100-mimic_fail)/100; 
+                                       }
+
                                        /* Get info */
                                        power_info(comment, i);

@@ -760,28 +795,6 @@
 }


-static int get_mimic_chance(int mimic)
-{
-       s32b chance;
-
-       call_lua("get_mimic_info", "(d,s)", "d", mimic, "level", &chance);
-       chance *= 3;
-
-       chance -= get_skill_scale(SKILL_MIMICRY, 150);
-       chance -= 3 * adj_mag_stat[p_ptr->stat_ind[A_DEX]];
-
-       if (chance < 2) chance = 2;
-
-       /* Stunning makes spells harder */
-       if (p_ptr->stun > 50) chance += 25;
-       else if (p_ptr->stun) chance += 15;
-
-       /* Always a 5 percent chance of working */
-       if (chance > 95) chance = 95;
-
-       /* Return the chance */
-       return (chance);
-}


 void do_cmd_mimic_lore()

While I am at it: The equipment and inventory rules can not be correctly added ingame still. Here is the fix:

Code: Select all

--- lib/core/auto.lua	2010-05-03 12:12:42.242356601 +0200
+++ lib/core/auto.lua	2010-05-03 13:30:18.035301550 +0200
@@ -810,9 +810,11 @@
 function auto_aux:add_child(sel)
 	-- <rule> and <not> contain only one match
 	if (auto_aux.rule.label == "rule" or auto_aux.rule.label == "not") and auto_aux.rule[1] then return end
+	if (auto_aux.rule.label == "rule" or auto_aux.rule.label == "equipment") and auto_aux.rule[1] then return end
+	if (auto_aux.rule.label == "rule" or auto_aux.rule.label == "inventory") and auto_aux.rule[1] then return end
 
 	-- Only <and> and <or> can contain
-	if auto_aux.rule.label ~= "rule" and auto_aux.rule.label ~= "and" and auto_aux.rule.label ~= "or"  and auto_aux.rule.label ~= "not" then return end
+	if auto_aux.rule.label ~= "rule" and auto_aux.rule.label ~= "and" and auto_aux.rule.label ~= "or"  and auto_aux.rule.label ~= "not" and  auto_aux.rule.label ~= "equipment" and auto_aux.rule.label ~= "inventory" then return end
 
 	-- get it
 	local r = auto_aux.types_desc[sel][3]()

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#38 Post by AnonymousHero »

I've applied the automatizer fix and the mimicry duration display fix. I've also added support for building the GTK2 interface with the CMake build system. (The last bit isn't really tested. It did start on my machine :)).

I think the mimicry spell failure thing is a little too ugly. (Though I suppose by the standards of the existing code, it mightn't be that bad.)

The fixes have been pushed to the git repo.

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#39 Post by AnonymousHero »

Just thought I'd mention it here:

Since there already quite a few fixes, I've tagged v2.3.8-ah in git. I'd appreciate it if somebody could compile an "official" 2.3.8-ah for Windows.

TheEvidence
Posts: 1
Joined: Sun May 09, 2010 7:25 pm

Re: ToME 2 maintenance

#40 Post by TheEvidence »

I just got a fresh copy (2.3.8-ah) out of the repository to try my hand at compiling on windows.

Once I had all the requisite bits the build seemed to go okay, but I had to turn on "Bizarre Display" for the main ToME window or things go a bit wonky. I don't have to do this in version 2.3.5 running on the same system.

Any ideas as to what's going on here?

budswell
Wyrmic
Posts: 292
Joined: Wed May 21, 2008 2:08 am

Re: ToME 2 maintenance

#41 Post by budswell »

I have always had to turn Bizzare Display on, even with the official 2.3.5. Otherwise I'd get the @ trails and all that. Both on win XP and Win7x64

KiTA
Cornac
Posts: 38
Joined: Mon Mar 20, 2006 11:28 pm
Contact:

Re: ToME 2 maintenance

#42 Post by KiTA »

Two quick questions:

1. Is there a place where I can just grab a tarball of the current source? I didn't see that on the Git site. Unless I just have to hit the download v2.3.8-ah as tar.gz link here:
http://gitorious.org/tome2/tome2/commits/v2.3.8-ah

(The main link on the tome2 folder is broken, it sends you to http://gitorious.org/tome2/tome2/commit/v2.3.8-ah )

2. Is there a free / open source C++ compiler out there for Windows that will compile this beast? DevC++ gagged on it. Trying MinGW next...
Last edited by KiTA on Fri Sep 24, 2010 6:14 am, edited 1 time in total.

KiTA
Cornac
Posts: 38
Joined: Mon Mar 20, 2006 11:28 pm
Contact:

Re: ToME 2 maintenance

#43 Post by KiTA »

Error when I try to compile on Windows:

[100%] Building C object CMakeFiles/tome.dir/readdib.obj
Linking C executable tome.exe
CMakeFiles/tome.dir/main-win.obj:main-win.c:(.text+0xec8): undefined reference t
o `ReadDIB'
CMakeFiles/tome.dir/main-win.obj:main-win.c:(.text+0x1941): undefined reference
to `PlaySoundA@12'
collect2: ld ?I?X?e?[?^?X 1 ?A?I?1???U????
mingw32-make[2]: *** [tome.exe] Error 1
mingw32-make[1]: *** [CMakeFiles/tome.dir/all] Error 2
mingw32-make: *** [all] Error 2

C:\tome-238-ah-win\tome2-tome2-v2.3.8-ah\tome2-tome2\src>

Latest mingw32. I had to use cmake-gui to get things rolling, as cmake keeps stupidly finding my Free Pascal's GCC and refusing to look anywhere else.

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#44 Post by AnonymousHero »

Yeah, as you've found out, compiling on Windows can be a pain.

I don't really have any way of testing Windows builds, so things may be a bit rough... Any additions to the build instructions for Windows would be welcomed.

ghostbuster
Uruivellas
Posts: 617
Joined: Mon Oct 09, 2006 7:47 pm

Re: ToME 2 maintenance

#45 Post by ghostbuster »

AnonymousHero wrote:Yeah, as you've found out, compiling on Windows can be a pain.

I don't really have any way of testing Windows builds, so things may be a bit rough... Any additions to the build instructions for Windows would be welcomed.
In my experience; the simplest way to compile on windows is to install cygwin and to use gcc. In general it works like a charm. Just use the proper makefile. Just type make -f makefile.cyg IIRC.

Post Reply