Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ Area Editor ➜ General ➜ Combining things with obj programs

Combining things with obj programs

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


Posted by Crawly   (6 posts)  Bio
Date Tue 11 Nov 2003 03:44 PM (UTC)
Message
Is it possible to use mob or obj programs to simulate combining items and performing tradeskills?
I was thinking making one object as a container and making it work as intended only if it contains certain things.

Is it possible for programs to activate in one room and make have effect in other rooms?

Or do I have to code this in the source?
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Tue 11 Nov 2003 04:54 PM (UTC)
Message
Quote:

Is it possible to use mob or obj programs to simulate combining items and performing tradeskills?

What exactly do you mean by this?
Quote:

Is it possible for programs to activate in one room and make have effect in other rooms?

Sometimes yes, sometimes no. I've found that it depends entirely on what you're trying to do with the program.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Crawly   (6 posts)  Bio
Date Reply #2 on Wed 12 Nov 2003 12:30 PM (UTC)

Amended on Wed 12 Nov 2003 02:37 PM (UTC) by Crawly

Message
Allright, as im in the process of learning Im trying to do small things and make them work just to learn the limits.

A few object that does nothing on their own. a powercell, some wiring, a motiondetector and a loudspeaker.

The idea was to use the obj programs (enter) to simulate the motiondetector but I only wanted the motiondetector and loudspeaker to work if you had connected it with the battery, thus the wiring. I was also thinking of having some kind of container to put them all in so that the "container" would actually be the finished object, so to speak.

It would work something like

The motiondetector will detect someone entering the room (using enter prog.) if it is in a container with a powercell and wiring.
The loudspeaker will go "INTRUDER" if its connected to a powercell in the same container AND gets a signal from the motiondetector...


Now to the big question: Is this possible to do without starting to code? Any help would be deeply appreciated.


Edit: My question about object that can influence the game several rooms away... If the object above would work i would like to build a remote that could trigger a object using the same frequency... Could this be setup using comchannels? I guess the latter has to be coded.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #3 on Wed 12 Nov 2003 04:06 PM (UTC)
Message
Well, this seems like one of the many cases in mobprogramming that you don't want to do things the intuitive way. I've found that very often, you have to work "backwards".

The intuitive thing to do here would be to program the individual objects to look for each other, as you described. However, it may be vastly simpler to simply program the "box", so you only have one program, not many. The problem here is that I don't know what if checks are available on your codebase (seems that you're using Star Wars?) so I can't help you any further.

You'll probably end up needing a small additional ifcheck, one that looks if a given object is inside another. It really depends, though.

And as for one object doing something somewhere else... what do you mean by "triggering an object with the same frequency"? If I understand you correctly, each remote will be tied to one "alarm system". How many alarm systems do you have? Can players build, purchase them?

If there are only a few, you can fake it by using the mpat commands. From there, you could probably do whatever your alarm script does, through mpats.

Geez. This is why I hate mudprogs. The language is awful and you always have to fight with it to get it to do anything. :)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Crawly   (6 posts)  Bio
Date Reply #4 on Wed 12 Nov 2003 08:43 PM (UTC)

Amended on Wed 12 Nov 2003 08:50 PM (UTC) by Crawly

Message
Heh, to make a long story short, I had this idea a couple of years back... just for fun.

Since theres about 2 billion generic fantasygames out there I thought the last thing the world needed was another one so I came up with someting else.

Originally the game was designed as a isometric, graphic game and I had quite alot of graphics drawn to it. I made several hundred frames of animation before I scrapped the project (I work with illustrations). It simply took to much from my productive time to draw all those frames and became to big for a sideproject. And 2d-isometric in the 3d-age just isnt worth the trouble.

Quite recently I discorvered the MUD-world and got surprised at how quick I got into it. I found out I did´nt miss the graphics at all... Naturally I thought I might be able to blow some life into the old idea but as a MUD. My hopes are that the SMAUG codebase will work even though I realise I will probably have to band together with a coder. I´m not totally lost in C but almost.


Now, back to what i want to do...

I want to create a fairly small enviroment with limited rescources. The setting will be post-apocalyptic where mankind (or whats left of it) have started all over. Nothing can be taken for granted and there will be no free lunch.

This is where the buildingsystem comes in.
The very essense of the buldingsystem is that the players should basically be able to come up with new ideas on his own (in the final system) based on the items he uses. Generic items like old wiring and nut and bolts are unlimited but finer things like motiondetectors will be very rare and (probably) fought over for their potential.
Parts used for weaponmaking purposes should also become very valuble.
Obviously people able to scavenge these items, as well as people with the ability to put them together will be very valuble to people with bigger plans.
After all, who wouldnt want to build a bomb connected to a motiondetector for that hard assassination.

About the frequency thing... and I know this require coding. Its something my original coder came up with. A transmitterobject that you could set for a frequency. Any recieverobject set for the same frequency would relay the message typed (as an arg put into a command) into the transmitter. This could be used in everything from walkie talkies to remotecontrolled bombs. I could pay my tech-guy to build four walkietalkies tuned to 2643 and give to my keypersonell to be able to communicate easily...

The idea is that people will have to band together to be able to defend what they got and hopefully certain people will try to profit on others (it´s human nature after all).
Luxuryitems will only be possible once the basic needs are satisfied to keep people alive. Thats probably when the plots and politics will naturally start to evolve.

I got a thousand more ideas but I think you understand the nature of the buildingsystem I want to make. I realise I probably will have to code at some point but it would be interesting to see just -how far- you can tweak the current system in SMAUG.

Thanks for answering my questions


EDIT: Do you know if anyone ever have coded some kind of tradeskillsystem for SMAUG?
Top

Posted by Crawly   (6 posts)  Bio
Date Reply #5 on Fri 14 Nov 2003 10:40 PM (UTC)

Amended on Fri 14 Nov 2003 10:44 PM (UTC) by Crawly

Message
I don´t know if the lack of answers indicate there might be no solution for what I want to do with SMAUG...

You seem to indicate in one of your posts that part of it might be possible to do however.
I would be very happy if you could elaborate that a little.
I was looking at the args available to MOB and OBj programs and noticed that objects can´t check for if someone got something else in inventory while mobs can...

You also mention that it is possible in some cases to have one thing affect another location. Got an example?


And I just want to add that the reason Im using SMAUG is simply that it was the first one I found after looking around. If other codebases are more suited I will use them but I know to little about them yet.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #6 on Sat 15 Nov 2003 05:55 AM (UTC)
Message
Well, the problem is that what you're talking about is really, really pushing things to their limits. In fact, I would suggest you start with code straight away, since you're going to have to at some point. You might as well do it right from the start, instead of go only so far, and realize that you have to start over.

Some of it is possible, I think. There was a time when I would fight with mobprogs and make them work, but as a coder it's an extremely frustrating experience. I hate so much having to deal with the language that I wrote my own scripting language that works exactly as I think a scripting language should. Unfortunately it can't be distributed for the moment for a lot of different reasons...

About having a script affect something somewhere else, it depends on what you want to do exactly. There is an mpat command that allows you to perform an action somewhere else. It's a little harder to trigger a script somewhere else, but I think some of my builders got that done.

See, in the end, you'll probably have to add more ifchecks and more mudprog commands anyways. No matter what you'll have to fight with it. I've found it to be an extremely unpleasant experience and not satisfying at all. My personal recommendation would be to stay as far away from mudprogs as possible for the actual coding parts of your game... they're only meant to do silly things like scripted responses, not fundamentals of a game.

One example of a seemingly trivial but extremely annoying thing about mudprogs is that you can only have one argument to an if statement, and one value to test against. In fact, due to that constraint, the value on the other side isn't even always a value to compare: for instance, I've seen things like if iscarrying($n) == 503 which means: is person $n carrying object with vnum 503? I hope you can see just how awful and limiting such a syntax is.

Unfortunately I don't know of any other codebase that'd let you do this kind of stuff. Maybe Dawn of Time would - it's SMAUG based. I don't know how developed the scripting engine is there.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
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.


23,315 views.

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

Go to topic:           Search the forum


[Go to top] top

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