[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Alltitude Code idea
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Alltitude Code idea

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Dralnu   USA  (277 posts)  [Biography] bio
Date Sun 17 Apr 2005 06:15 PM (UTC)
Message
had an idea, and just want to know how possible it owuld be to make, which is an altitude code. Something that would let people using fly to travel into rooms above others, and maybe allow for exits at certant alltitudes (like the Astral Plane or Olympus, for some examples). I'm just wondering how it might be doable, as the added effect on combat would be interesting, seeing as how it could give people like pixies an advantage over others since they are a weaker race (sorry if I offend and pixie fans, they make good spellcasters). If someone decided to try and make one to post on MUD magic as a SMAUG snippet, it would be great, but if not an idea on what it would take besides pretty much a rewrite of the combat and movement system.
[Go to top] top

Posted by Dace K   Canada  (169 posts)  [Biography] bio
Date Reply #1 on Sun 17 Apr 2005 09:50 PM (UTC)
Message
In mud.h, struct char_data, add an entry for
sh_int altitude;

Then, assuming you want people to be able to fly higher/lower if they have wings, or have the fly spell,
create a fly command.

Fly up would perform ch->altitude ++;

Fly down would perform ch->altitude--;

Perhaps a land command would also be in order, to zero the value.

Then, you could just add an exit value for altitude, and a check to see if ch->altitude >= exit->altitude.

As for combat, I'd suggest a combat check that would compare both char's altitudes against each other. If, say, the difference between the values is greater than or equal to two, they would not be able to hit each other w/o bows.
However, if the difference is only one, then whichever char's at a higher altitude could have a hit/dodge bonus.


's just a basic outline, but I'm sure you could work it from there.
Cheers.

ASJ Games - .Dimension 2, Resident Evil, and snippets - oh my!
http://asj.mudmagic.com

Drop by the area archives and find something for your mud. http://areaarchives.servegame.com
[Go to top] top

Posted by Gadush   (92 posts)  [Biography] bio
Date Reply #2 on Mon 18 Apr 2005 02:25 AM (UTC)
Message
And you'd likely want to modify look and such too so that a flying PC/Mob would give the message "<name> is here, flying about <altitude> above you." Or something like that.
[Go to top] top

Posted by Dralnu   USA  (277 posts)  [Biography] bio
Date Reply #3 on Sat 23 Apr 2005 07:44 PM (UTC)
Message
Thanks. I'm fairly new to coding, and was thinking that it would be alot more complicated then that. Appreciate it :)
[Go to top] top

Posted by Dace K   Canada  (169 posts)  [Biography] bio
Date Reply #4 on Sun 24 Apr 2005 04:47 PM (UTC)
Message
Mmf. I'm sure there's a complicated way to do it, but..
A major part of coding is figuring out the simplest (and cleanest! :D) way to achieve a given task. :P

ASJ Games - .Dimension 2, Resident Evil, and snippets - oh my!
http://asj.mudmagic.com

Drop by the area archives and find something for your mud. http://areaarchives.servegame.com
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Reply #5 on Sun 24 Apr 2005 10:20 PM (UTC)
Message
Couldnt you just connect rooms and make the higher rooms flying rooms only (eg. make a new flag where you have to be flying)? Thats how I would do it, well....maybe not exactly, but it seems even more simple then the proposed idea.

~Nick Cash
http://www.nick-cash.com
[Go to top] top

Posted by Dralnu   USA  (277 posts)  [Biography] bio
Date Reply #6 on Mon 25 Apr 2005 01:59 AM (UTC)
Message
What I was thinking was make it whee you have to be at a certaint alltitude to even see the exit. I mean if a cave openning is a few hundered feet up a ledge, you won't see it standing at the bottom of the cliff...
[Go to top] top

Posted by Gatewaysysop2   USA  (142 posts)  [Biography] bio
Date Reply #7 on Mon 25 Apr 2005 06:02 PM (UTC)
Message
Hrmmm. I am in agreement with Whiteknight on this one.

If you used the earlier suggestion of having a few rooms going "up" with the "nofloor" setting and the "air" sector type, people would 1) have to fly to get up there and 2) never see the exit at the end of the series of "up" rooms unless they flew up there to the final room in the series.

Would that not suffice? I would think that's a preferable way to do it without having to hard code anything new. IMHO, the other way would be a bit over complicated to achieve the desired effect. My $.02 anyway.


"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence
[Go to top] top

Posted by Txzeenath   USA  (54 posts)  [Biography] bio
Date Reply #8 on Fri 29 Apr 2005 03:36 PM (UTC)

Amended on Fri 29 Apr 2005 03:43 PM (UTC) by Txzeenath

Message
Hmm moving up... that's the same as making individual rooms, which is >not< altitude.. what the person wants is to be in the SAME room with other objects/people etc. and give the actual image of being in the air.


Personally I think just adding an altitude to CHAR_DATA and having it be increased based on the argument in a "fly" command, allowing them to raise up and down at will.


Than for exits, you could add an altitude entry to the appropriate spot, and than find the part around here:
if (pexit->to_room && (!IS_SET (pexit->exit_info, EX_WINDOW)
|| IS_SET (pexit->exit_info, EX_ISDOOR))
&& !IS_SET (pexit->exit_info, EX_HIDDEN))

in do_exits, and check if their height, is a certain amount in relation to the door(ex: ch->altitude == pexit->altitude) or
(ch->altitude == (pexit->altitude - 5) || ch->altitude == (pexit->altitude + 5))

The first would require them to be in the same room, the second would require to be 5 rooms away up or down.


With a little learning you could also add individual messages for how far things are:

50 feet = A small figure stands below you, about 44 feet away
20 feet = A rather large man stands below you, about 14 feet down.

etc. etc.

You will also want to modify can_see so that players cannot see others who are too far away, which will by default, also disallow fighting. You may also do(as someone said) add in a few bonuses for being higher or lower than your enemy.


This can also open up for in-room movement.. add the same things but in a smaller portion, allowing for players to move around in the room, modifying a distanceW, distanceE, etc.(distanceW, distanceE etc. means the distance to the end of the room).

You would also want to modify redit to allow changing of altitude and perhaps modify "look" so that players can look up to see other people flying around. You could even do similar to objects by adding the altitude and modifying can_see_obj.



Edit-------
I may have mistaken in the poster's wishes.. regardless this is still a good idea in my opinion.

Hmm I like this idea :-p I might even consider adding it to my mud haha.

Darkness comes along thy path, searching, wanting, calling wrath,
shadows awaken, release the light, one and only.. here to fight,
challenge the darkness, the shadows they call, hunting the living,
more and all. Roaring thunder, full of hate, a single bound, seals
your fate.

-Txzeenath

telnet://divineright.org:8088
Alumuble Arda -
*Player owned shops, clans, and housing
*Multiclass & Stat training
*Random mob name generation implemented and Overland mapping.
*Realistic equipment statistics
*Interactive enviroment(weather/sectors)
*Weapon sheaths(scabbards), Throwing weapons
*Automatic crash recovery, saving, and reporting without disconnecting
*Fully customizeable color, Automapper, "Smart" mobiles, Hiscore tables, and more!

Currently running AGE v1.9.6(Originated and modified from Smaug 1.4a)
[Go to top] top

Posted by Dralnu   USA  (277 posts)  [Biography] bio
Date Reply #9 on Sat 30 Apr 2005 12:31 AM (UTC)
Message
That was close to it. Until I get a little farther into fixing this up, it'll be on a back burner.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


8,970 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]