Other sitesPhantasia GameBlitzkriegWoW RP ProfilerRage of Mages

HomeAbout the GameHistory
ArticlesCheatsEncyclopedia


Phantasia.nl - Rage of Mages 2

Editor HelpPicturesFiles
Hat ServersLinksForum

Menu  Register  Login

Topic: Map editor help


Navigation: Forums \ Rage of Mages 2


Author: b6223 (32b5 [at] gafc [dot] com)
Date: 27-Jul-16, 18:52:42
"Just hopped in to tell that I've just sent the SkeletonKing Quest map."

So, where it is? Should it be in the 'Files' section? It's not there. Does it need to get accepted?
 
Author: NOVA (KINGKOTA666 [at] HOTMAIL [dot] COM)
Date: 21-Nov-14, 20:00:20
Doesn't look like there will be any Christmas HAT. But I was intending/hoping to run Simon Dekker's Allods & Legends NWN module for the last 2 weeks of December. I'm not sure how many people would be interested in playing that. I've spent the last few weeks making revisions to make it compatible for PW server hosting and fixing a few exploits and bugs.

It's now pretty much ready for prime time. Many more revisions past what I've done so far and it would drastically change the tone that Simon intended for the thing.
 
Author: bbKing (arsnova30 [at] hotmail [dot] com)
Date: 20-Nov-14, 08:16:20
Hello all,
Just hopped in to tell that I've just sent the SkeletonKing Quest map.
No X-mas Hat this year?! :)
Be well all of you,
BB King
 
Author: the.gray.fox (the [dot] gray [dot] fox [at] hotmail [dot] com)
Date: 15-Nov-14, 02:25:49
************************************************************************************************
Mysterious Seal wrote:

BTW can you please send me the "Skeleton King Quest" map? I'm dying to play it.
************************************************************************************************
BTW am I not waiting for a bunny to hop this way? So?!

Nevermind.
I can not satisfy your request. Months ago I lost many files. My backups were partial. To this day I do
not know for sure all that I lost. Just now I searched for the map, and discovered that I have no maps.

But the Skeleton King? I remember it was a big and mean map. Took me some attempts to clear it
without dying. But I have never been a big rom2 player. My collegue was. He introduced me to the game,
gave me this map and others, taught me some tricks. Now that I think about it, he must have met online
some of the very people around here. Or their friends. How else could he get a hold of the map?

Too bad that I lost contacts with him years ago.


-fox
 
Author: Mysterious Seal (rozowapantera1976 [at] wp [dot] pl)
Date: 15-Nov-14, 00:56:51
Wow, the community sure will never die with such members. Though I was able to learn how to create simple triggers by myself I never got to figure out how these variables work and your post just made it much more clear for me. Still don't get how this exactly works to be true... But I'll study your hints to learn it.

BTW can you please send me the "Skeleton King Quest" map? I'm dying to play it.
 
Author: the.gray.fox (the [dot] gray [dot] fox [at] hotmail [dot] com)
Date: 14-Nov-14, 23:55:51
Hello.

The "Skeleton King Quest" map is very well made.
The author used a great deal of triggers and with good effect.

Thanks to that map I was able to understand much of how the Triggers work.
In essence, Triggers allow you to build logical constructs that are much similar to those you concoct
when writing a program. Only the syntax is different.

You have Conditions to test, Expressions to feed to the conditions, and Actions to execute when the
tested Expressions are found true.

The Conditions are the "Checks".
The Actions are the "Instances".
As for the Expressions, they are always a test of a numeric value against another numeric value.


With reference to the picture that you linked earlier...
Have a look at the lower left corner, where the "Checks" group is (above the "Manage Checks" button).
Here is where you form your conditional checks. All such checks are in the form of an "if()" conditional,
optionally chained to up to 2 "and ()" conditionals.

Between the if(), the first and(), and the second and(), you can test for up to 3 Expressions in a single
Check.

//////////////////////////////////////////////////////////////////////////////////////////
In your picture you have the following conditional being defined:
//////////////////////////////////////////////////////////////////////////////////////////

- if (v70 (spy talk) = 0)

then execute the Instances

- Mess 1 : start
- Skeleton swarm
- Spy phase out
- Invisible Spy phase out


Also notice the "Run Once" checkbox. It is flagged, so making this conditional check a one-shot thing.
The if() conditional will repeatedly run from the moment the map starts to play. It will do so many times
per second, per every second of play. But as soon as the condition under test is found true, the
Instances (listed in the upper right corner of the window) are executed -- then this if() conditional stops,
never to run again
You will want to make most of your Trigger checks a "Run Once" affair.

Do not be limited by what you see in the picture. To harness the potential of Triggers you have to think as
if you were programming. Meaning that you may check a variable against another variable as well.
You can get more creative than that: sometimes you want to test the map without a specific Trigger being
active. But instead of deleting the Trigger, you can modify its Expression to test for something that will
never come true, like: if (0 = 1)

Variables can be named anything you like. I suggest you keep their names short and easily recognizable.
Often you will want to write an Instance that does something with a specific variable, and if you want to
give it a meaningful name you will probably name the Instance after the variable it works on.

For example look at your picture. In the list of Instances (above the "Manage Instances" button) you have
an Instance named "v70++".
That is a nice way to say what the instance does: it increments the Variable v70 by 1.
Like writing: v70 = v70 + 1
(NOTE: the ++ in the Instance name is borrowed from the C++ programming language syntax, where the
++ unary operator is in fact used to increment a numeric variable by 1).


Notice that a single Trigger can run a max of 4 Instances.
If for any reason you need to run, say, 6 Instances on a given Check, then, how would you do it?
Simple. You use 2 Triggers.
And you write the Checks of both Triggers so that they test for the same set of conditional Expresions.
Doing so ensures that once the conditional Expressions become true, both Triggers will execute their
Instances concurrently.
But of course nothing is truly concurrent. There always is a well defined order of execution. It will not hurt
to know it:
In case of concurrent Triggers, the game will first execute the Trigger found higher in the list of Triggers.
As for the Instances executed concurrently by a given Trigger, the game will run them in the order they
are listed: from top to bottom.

In this example we have 6 Instances split on 2 Triggers. It will not matter how the Instances are actually
split. You could split them 4/2, or 3/3, or 2/4.
Heck, if you used 3 Triggers instead of 2, you could even split them like: 1/2/3, 4/1/1, 2/0/4... and so on.
Thanks to this flexibility you can run any number of Instances on the same conditional Expression, and
using any number of Triggers.


Notice that a single Check can only test for up to 3 Expressions.
What if you wanted to create a Check that is based on 5 Expressions altogether, not just 3?
Simple again. You take advantage of Variables.

////////////////////////////////////////////////////////////////////////////////////////////////////
For example, suppose that you have defined the following 5 variables:
////////////////////////////////////////////////////////////////////////////////////////////////////
- vOgre
- vSuccubus
- v1
- vTheGrayFoxRules
- vAndEveryoneKnowsIt

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
and (for some reason) you wish to run an Instance in case the above 5 variables satisfy the conditions:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- vOgre = 1
- vSuccubus != 0
- v1 > 0
- vTheGrayFoxRules >= 1000
- vAndEveryoneKnowsIt >= 1000

(NOTE: The != comparison stands for NotEqual, which is the exact opposite of the = Equal comparison.
Like the ++ thing explained above, the != comparison is borrowed from a C-like language. Actually I am
surprised that the = Equal comparison is not written == like it is in C/C++ and a few other languages)

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
And the Instance you want to run when all 5 variables satisfy your conditions is:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- SendFoxABunny


How do you write it all in the form of a single Check?
You cannot -- You can not use just 1 Check.
You have 5 expressions to test: you must use (at least) 2 Checks -- and therefore 2 Triggers.

In the 1st Check, you check for 3 variables. If these 3 satisfy your conditions, you execute an Instance
that will setup a 6th variable (let us call it: "vCheckPassed") that you will use to signal to the 2nd Check
that the 1st Check was satisfied.
As for the 2nd Check, you will test for the remaining 2 variables (from the initial pool of 5) plus the special
6th variable set by the Instance of the 1st Check.
If the 3 variables from the 2nd Check satisfy your conditions as well, then you execute the Instance
named "SendFoxABunny".

Too confusing?
This might illustrate better...

//////////////////////////////
First, the 1st Check:
//////////////////////////////
- if (vOgre = 1)
- and (vSuccubus != 0)
- and (v1 > 0)

then execute the Instance:

- FirstCheckPassed

(NOTE: The "FirstCheckPassed" Instance is one you create for the sole purpose of taking a variable and
setting it to a specific value. In our example you could take the variable "vCheckPassed" and change it
from 0 to 1)

/////////////////////////////
Now the 2nd Check:
/////////////////////////////
- if (vCheckPassed != 0)
- and (vTheGrayFoxRules >= 1000)
- and (vAndEveryoneKnowsIt >= 1000)

then execute the Instance:

- SendFoxABunny

:-)

This method allows you to create Checks that can test for any number of conditional Expressions, not
just 3 (or 5 like in the example). And when you combine all of the above you can truly form Checks of
any complexity that can run any number of Instances, using any number of Triggers.

And there you have it, the.gray.fox earns a bunny for a spectacular explanation of something he does not
even have installed on his computer. But that is a story for another day. Good night.


-fox
 
Author: Mysterious Seal (rozowapantera1976 [at] wp [dot] pl)
Date: 14-Nov-14, 20:08:25
Thank you very much for your fast and broad answer. Believe me or not but I just read about Master and his accomplishments before your reply as I was browsing older threads. I was REALLY amazed and interested, it's truly a great loss. Could you please send me his Skeleton King Quest map? I'd love to see it.

As for world.res file, I'm not really interested in editing it because as you said, it edits all monsters of the same type thus it would be very problematic to share my map for everyone later. It's great if someone is to set up a HAT with custom settings regardless.

"Good luck with whatever you're trying to accomplish."
Thank you!

If anyone could answer to my other questions I would be very grateful.
 
Author: NOVA (KINGKOTA666 [at] HOTMAIL [dot] COM)
Date: 14-Nov-14, 19:35:32
Let me start by saying I won't even claim to be close to an expert on use of the map editor features. Sadly, probably one of the best persons at using the features of the map editor it is no longer with us. On the ROM2 forums he went by the avatar "MASTER" or "KELESIS" and he lived in Italy. Sadly, he died tragically in a car crash many years ago. But he was a true expert at using the map editor and it's ecclectic features. The ROM2 community suffered a terrible loss when he died.

I'm no MASTER for sure, but I can offer a tiny scrap of advice regarding #2 on your wish list. You CAN edit the world.res file and change the statistics of just about everything in the game. This includes the effects of spells, potions, the attack modes of monsters, the starting gear of brand new characters....pretty much everything you can think of. The down side is that the process is anything but simple and intuitive. Another possible downside is that the effects would be universal throughout every map you run. So in other words, making the changes to the world.res file you could not have some succubus use fireball while others do not. However, since each LEVEL succubus is a separately defined creature, you COULD for example have all succubus level 3 and above HAVE fireball while levels 1 & 2 do not.

The difficulty with editing the .res files is that the .res format is really multiple files combined and then compressed similar to zip files (sort of). So you'll have to figure out a way to uncompress the .res file, extract the exact sub-files you want to edit, convert them to an editable format, make your edits, recombine the files in the proper folder and sub-folder structure, and then finally recompress them all back into the proper single .res file. As I say, it's NOT easily done, but certainly IS possible.

Let me whet your appetite for what is possible via world.res file editing with just one more potential idea you could implement. Let's say you wish to restrict use of teleporting to ONLY mages. One simple way to do this would be to redefine the teleport scrolls. Each scroll is really just casting a mage spell at a simulated mage skill level. In the case of "normal" scrolls this level is usually 50 and for "elven" scrolls it's usually level 100. All of the scrolls are defined in the world.res file. So, you could redefine both normal and elven scrolls to cast at a simulated level of ZERO, the end effect would be that anyone trying to teleport using a scroll will wind up with a teleport range of zero and in effect will teleport to the same spot on the map they started from. They will have teleported and they will have used the scroll up, but they also will have gone nowhere. So now ONLY mages who can cast the spell from SKILL rather than from a scroll will be able to really teleport at all.

The possibilities of what you can do just by making minor edits to the world.res file are as wild and crazy as you let your imagination get. As I've noted above, they're just not easy to accomplish because of the .res file format. Also, REMEMBER TO MAKE A BACKUP of your world.res file BEFORE you try any edits. The process tends to go wrong quite often and result in a corrupt file. You'll certainly want to be able to start from scratch with a clean file if it gets messed up.

Good luck with whatever you're trying to accomplish.

-NOVA
 
Author: Mysterious Seal (rozowapantera1976 [at] wp [dot] pl)
Date: 14-Nov-14, 17:38:02
Hi and greetings to all RoM fans still around!
I've been making some multiplayer maps using the map editor and wondered if and how some features are possible to play with.

1. Road signs with custom text. I remember seeing website with tutorial on this few years ago but it's now down.

2. Making choosen monsters not to cast certain spells they naturally use, for example so succubi can't throw fireballs. Is this somehow possible with triggers or any other way?

3. What "variables" in the trigger editor can be used for and how. Also what's the purpose of "Check eq" menu? Here's an image to show you what I mean:
http://i.imgur.com/RFNPaQf.png

Sorry for my english.
Thanks.
 
^top