ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Sun Apr 11, 2021 8:55 pm

All times are UTC




Post new topic Reply to topic  [ 326 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 22  Next
Author Message
 Post subject: Re: ToME 2 maintenance
PostPosted: Thu Dec 09, 2010 7:51 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 712
Here is a patch.

The changes on this one:

- Minor displacement never produces void gates, only controlled teleport at high levels.
- Character Armor gives AC equivalent to plev (i.e. Mindcraft skill level) instead of a flat 50.
- Psychometry just identifies, that's all.
- Adrenaline now gives up plev * 5 HP, but the speed bonus is plev / 5, so it's less powerful at medium levels.
- Psychic Drain is now a bolt; it does more damage than before and does not drain the player's energy. (It formerly took an extra turn and a half at normal speed if successful.)

Those are all from the Mindcraft git branch, except for Psychic Drain, which is borrowed from my defunct TFork project. I'm not quite satisfied with the latter - ideally I want to give it limited range, but I'm not quite sure how - but I think it is an improvement.

Anyway here is the patch.

Code:
--- cmd7-old.c   2010-12-09 14:05:36.000000000 -0500
+++ cmd7-new.c   2010-12-09 14:19:19.000000000 -0500
@@ -559,10 +559,8 @@
                   get_pos_player(10 + p_ptr->to_s / 2, &ij, &ii);
                }
 
-               cave_set_feat(p_ptr->py, p_ptr->px, FEAT_BETWEEN);
-               cave_set_feat(ij, ii, FEAT_BETWEEN);
-               cave[p_ptr->py][p_ptr->px].special = ii + (ij << 8);
-               cave[ij][ii].special = p_ptr->px + (p_ptr->py << 8);
+               /* Just teleport the player */
+               teleport_player_to(ij,ii);
             }
 
             break;
@@ -606,7 +604,8 @@
          /* Character Armour */
       case 6:
          {
-            set_shield(p_ptr->shield + plev, 50, 0, 0, 0);
+            /* use plev AC instead of a flat bonus */
+            set_shield(p_ptr->shield + plev, plev, 0, 0, 0);
             if (plev > 14) set_oppose_acid(p_ptr->oppose_acid + plev);
             if (plev > 19) set_oppose_fire(p_ptr->oppose_fire + plev);
             if (plev > 24) set_oppose_cold(p_ptr->oppose_cold + plev);
@@ -619,14 +618,8 @@
          /* Psychometry */
       case 7:
          {
-            if (plev < 40)
-            {
-               psychometry();
-            }
-            else
-            {
-               ident_spell();
-            }
+            /* Pseudo-ID is now useless, just invoke ID */
+            ident_spell();
 
             break;
          }
@@ -653,7 +646,8 @@
          {
             set_afraid(0);
             set_stun(0);
-            hp_player(plev);
+            /* Give the player a decent amount of HP */
+            hp_player(plev * 5);
 
             b = 10 + randint((plev * 3) / 2);
 
@@ -668,12 +662,12 @@
 
             if (!p_ptr->fast)
             {
-               /* Haste */
-               (void)set_fast(b, 10);
+               /* Give a speed bonus proportional to skill level */
+               (void)set_fast(b, plev / 5);
             }
             else
             {
-               (void)set_fast(p_ptr->fast + b, 10);
+               (void)set_fast(p_ptr->fast + b, plev / 5);
             }
 
             break;
@@ -684,12 +678,11 @@
          {
             if (!get_aim_dir(&dir)) return;
 
-            b = damroll(plev / 2, 6);
+            /* Up to twice as much damage as before... */
+            b = damroll(plev, 6);
 
-            if (fire_ball(GF_PSI_DRAIN, dir, b, 0 + (plev - 25) / 10))
-            {
-               p_ptr->energy -= randint(150);
-            }
+            /* And no energy drain... But it's now a bolt. */
+            fire_bolt(GF_PSI_DRAIN, dir, b);
 
             break;
          }


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Thu Dec 09, 2010 8:18 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482
Thanks, I'll apply a couple of those this weekend and tag 2.3.9-ah (which will most likely be the final "AH" version.)


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Thu Dec 09, 2010 8:23 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 712
You're welcome!


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Fri Dec 10, 2010 6:47 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482
I've tagged and pushed 2.3.9-AH to the gitorious repo. I'd be very grateful if someone could do a Windows compile.

This is likely to be my final release.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Fri Dec 10, 2010 7:24 pm 
Offline
Yeek

Joined: Fri Dec 10, 2010 7:05 pm
Posts: 13
I've made a working Windows compile, but as it's my first time I'll wait and see if someone else steps forth. Having said that, I'd be interested in helping out with some minor fixes and tweaks like making Runecraft at least functional and fixing Inertia Control (right now it just displays the anti-magic field message). I'll post a list of proposed changes in any case if anyone is still interested.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Fri Dec 10, 2010 7:30 pm 
Offline
Yeek

Joined: Fri Dec 10, 2010 7:05 pm
Posts: 13
And if anyone is wondering who the heck the new guy is, I've played since it was called PernAngband and been source diving to look things up almost as long, so I do know my way around ToME. I've just never had the need before to compile my own copy (or make a forum account :oops: )


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sat Dec 11, 2010 4:13 am 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482
Cool. I'll happily apply anything that's strictly fixes.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sat Dec 11, 2010 8:10 am 
Offline
Yeek

Joined: Fri Dec 10, 2010 7:05 pm
Posts: 13
Alright, I've created a branch for new changes. I'm new to Git so bear with me if I do anything wrong.
Some things that have been bothering me that I'm looking to fix are:

Inertia control doesn't work at all - relatively easy lua fix.

Triggering Wave of Power via Spellbinder on something with a fire or electric aura can cause a loop.

Runecraft needs to decrease fail rates and not just increase mana consumption. There needs to be other stuff done as well, but we'll start with this. Also, using a mage staff is counterproductive as it increases fail rates more than it increases damage.

Theft chance should scale better with price to prevent things like chain stealing speed rings stores.

I've noticed a few other things that will probably require fairly big changes to fix and balance so I'll list them in a separate thread.

edit: also, I noticed that the Minor Displacement -> controlled teleport change didn't make it into the final tag... were there particular reasons? I thought it was quite a good change as the void gate mechanic causes all sorts of problems with removing stairs, stores, and quest exits and wasn't very well balanced or intuitive to begin with. It also means mindcrafters start needing Phase Door scrolls after 25 in mindcraft when it wasn't necessary before.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Dec 12, 2010 2:34 pm 
Offline
Wyrmic

Joined: Wed May 21, 2008 2:08 am
Posts: 292
Uploaded windows version
http://www.mediafire.com/file/d1y6o6drb ... .9-bud.zip
md5(tome-v2.3.9-bud.zip) ==> 150b3980a23611892d8e37fee1b48b19

Compiled with MS Visual Studio 2010 using my own makefile
- font-win.prf updated to work on XP/win7 (dots display)
- bizzare display turned on for main window
Built zip before testing, so no user files yet. Figured this is "cleaner". I have tested since.

All my tome uploads are here:
http://www.mediafire.com/?deoec9a56kjnc

_________________
http://angband.oook.cz/ladder-browse.php?e=budswell
http://te4.org/user/1471/characters


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Thu Dec 16, 2010 6:28 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482
Prime wrote:
edit: also, I noticed that the Minor Displacement -> controlled teleport change didn't make it into the final tag... were there particular reasons? I thought it was quite a good change as the void gate mechanic causes all sorts of problems with removing stairs, stores, and quest exits and wasn't very well balanced or intuitive to begin with. It also means mindcrafters start needing Phase Door scrolls after 25 in mindcraft when it wasn't necessary before.

I hadn't really thought too much about it, and I didn't want to make a change which risked gimping them -- but I think I buy the "argument from bugginess" you've put forward (i.e. they risk getting stuck permanently). If there is going to be another release, I'll probably import that change as well.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Feb 20, 2011 10:59 am 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482
Just in case anyone cares:

I've recently felt a little more motivated to work on ToME 2.x, but I keep running into the fact that the code is incredibly brittle (and thus basically unmaintainable). I think that this has a lot to do with ToME essentially being written in two languages which don't share a common model of the world. If ToME 2.x is ever going to become properly maintained by people with limited time, I think this needs to change.

As I see it there are two options: 1) Gradually move everything to Lua, or 2) Remove Lua. It may just be my natural static type checking bias, but I don't really see the first option as particularly viable given the sheer amount of low-level code that exists in ToME. If a dynamically type checked language were on the table, then I'd rather go with a "growable" language like Scheme/LISP. Keeping any kind of stability during such a transition also requires a serious commitment
to unit testing lots of "trivial" code. In short: Too much work and I don't really like Lua so I'm not going to be volunteering for such a task.

Given the current language landscape there are two options for removing Lua: Rewrite the Lua bits in C, or rewrite the Lua bits in C/C++. Given the difference in level between C and Lua, I don't think I'd survive an attempt to rewrite in C.

So: I'm considering switch from compiling using C to using C++ in a bid to start refactoring the code to be more maintainable in the short term, and hopefully opening up the possibility of removing Lua completely in the long term. I'd start with very simple things like cleaning up the string handling, moving single Lua functions back to C, etc. Given the ability to interface to C++ code using plain C functions, I think it should be viable to gradually move increasingly
large bits of Lua code back into C/C++.

I'm not sure what I'm going to do about modules if/when I ever get that far, but I think this could be solved by modularizing the ToME code properly in C/C++ such that it becomes more like a library rather than a single monolithic blob (aka. "framework").

Is switching to C++ likely to be a problem for you non-GNU/Linux people out there who are doing your own compiles? To avoid writing lots of new C++ code, I'd definitely be using a recent version of Boost. However, given the amount of effort that goes into maintaining Boost and keeping it cross-platform, I don't think that should cause any particular issues for non-GNU/Linux people.

What say you?


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Feb 20, 2011 10:15 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 712
That would be awesome, but it also sounds like an incredible amount of work. I'm not sure it's worth spending that much time on.

A thought: you've mentioned before that ToME 2 uses an old, hacked up version of Lua. Would implementing the current Lua standard, and cleaning up the scripts to comply with it, be an option? It might not be ideal, but there are plenty of programs written in C and extensible in Lua, e.g. the Awesome window manager (which is quite stable).

A further thought: if reimplementing Lua properly is an option, I'd probably be able to help update the old scripts. That'd probably be tedious, but I doubt it would be difficult (unless there's something I'm missing).


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Feb 20, 2011 11:20 pm 
Offline
Reaper

Joined: Wed Dec 12, 2007 12:21 am
Posts: 2257
Location: New Zealand
Here is a thought for you...

If you are considering this then consider porting to T-engine 4!

_________________
Regards

Jon.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Mon Feb 21, 2011 12:22 am 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 712
Can't speak for AH but T4 seems to be unavoidably sluggish for me. Rubbishy Intel video hardware does not seem to like it.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Mon Feb 21, 2011 12:35 am 
Offline
Reaper

Joined: Wed Dec 12, 2007 12:21 am
Posts: 2257
Location: New Zealand
DG has posted a fix for that.

darkgod wrote:
Ok people who have lags can you please try that:
Edit the file game/loader/pre-init.lua and add
Code:
collectgarbage("setpause",100)
collectgarbage("setstepmul",400)
collectgarbage("restart")


at the top of it

Then run the game and see how it feels

I hope it works for you. Also of course you should turn off a lot of the graphic options as well.

_________________
Regards

Jon.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 326 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 22  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group