Text editor

A forum for discussing map making ideas and problems for the Myth series.
Post Reply
User avatar
Fury IX
Posts: 254
Joined: Thu Oct 19, 2006 7:37 pm

Text editor

Post by Fury IX »

Is there a simple to use free text editor that would enable me to view more than the 10 or so map actions at once? I just want to see whats in the map actions loathing pane without having to scroll around. I don't need to edit it there, or see any parameters, I just want to see and print out the outline.
User avatar
Baak
Posts: 1109
Joined: Sat Mar 20, 2004 6:26 pm
Location: Mything

Post by Baak »

The best I've come up with so far (and there may be better ways) is to "export" the map actions into a text file and then mess with it externally, like so:

Mesh --> Export Map Actions...


For one of my upcoming map projects I exported the base map actions, then generated 3/4ths of them via a Perl script and imported them back in. Was sweet. You just have to watch the extra ^M characters if you're on a PC (be sure to account for them properly).


I use vi, which is the best text editor I've ever found, but then I'm an old-school Unix guy at heart and it's certainly not for everyone. :)

If you're interested in it though, there is an excellent version called vim that's been out for years, is available for umpteen O/S's, and is free.
User avatar
Fury IX
Posts: 254
Joined: Thu Oct 19, 2006 7:37 pm

Post by Fury IX »

Yea im on PC... and I only understood about half of what you said... But vim seems to work alot better than notepad. Thanks :)
Now I need to find an easy way to clean all the parameters up so I can just see the core map actions.
gugusm
Posts: 487
Joined: Mon Aug 22, 2005 1:16 pm
Location: Klucze, Poland
Contact:

Post by gugusm »

If you want to learn scripting here are some guides how to do this:

http://www.mything.org/index.php?a=arti ... =scripting
User avatar
Khadrelt
Posts: 479
Joined: Tue Aug 29, 2006 2:59 pm
Location: Utah, USA
Contact:

Post by Khadrelt »

Is there a more in-depth manual about scripting around anywhere? Ares' guide is excellent, but there's just so much STUFF in that little 'map actions' window that neither the documentation or Ares' guide explain.
The cake is a lie.
User avatar
Fury IX
Posts: 254
Joined: Thu Oct 19, 2006 7:37 pm

Post by Fury IX »

Yea I think I got the basics of scripting in loathing down, been trying to learn for a few months now. But having some trouble with organization on large scripts, deactivating all patrols/legions and stuff when end boss comes out.

One thing I don't understand about scripting is mungers in general. Is there a tutorial that says something about them other than "DONT USE THESE!" ?
User avatar
Baak
Posts: 1109
Joined: Sat Mar 20, 2004 6:26 pm
Location: Mything

Post by Baak »

I could be wrong, but my off-the-cuff interpretation of mungers is that they somehow allow for substitution of parameters in actions in a semi-mystic way, perhaps on the order of "variable variables" in PHP, thus:

$name = "Fury IX"

$reference = "name"


print $$reference

Fury IX


I believe they are used in "The Baron" and I am planning in getting into them more deeply this winter as I look over and polish my RDF Solo "Banor's Keep".
A-Red
Posts: 771
Joined: Fri Jul 23, 2004 8:36 pm

Post by A-Red »

Mungers aren't bad at all. I use them all the time. You only need to remember 2 things when dealing with them.

1) DO NOT Munger a running Geometry Filter. Bad things will happen. Turn it off, Munger it, then turn it back on. At least, that's what I hear; I've never had occasion to Munger one of those.

2) The order you put things in is the key to Mungers. The name of the MUNG must come first--which means you can't duplicate them, because that always puts the name after the other parameters. Say you're changing the subjects of an Attack (ATTA) action, so that a different group of monsters would do the attacking instead. Your Munger would look like this:

ATTA Monsters A Attack
Attackers: [monsters A go here]

MUNG Change Attackers to Monsters B
Replace Parameters: Monsters A Attack
*mons_identifier, subj: [monsters B go here]

*this is a "custom" parameter. You will always need to use custom when dealing with Mungs, because you could potentially be changing any type of parameter. Select "custom", put "subj" in the name field, and select "mons_identifier" in the type menu. If you look at the example script above, you'll see that Replace Parameters, which identifies the action you're going to change, goes first; the custom parameter, which indicates what part of that action you're going to change, goes second.

You can change multiple actions with the same MUNG. Say you want to change that ATTA, and a PLAT as well.

ATTA Monsters A Attack
Attackers: [monsters A]

PLAT Baron's Platoon
Initial Squads: Baron Squad, Stygs Squad

MUNG Change Attack and Platoon
Replace Parameters: Monsters A Attack
mons_identifier, subj: [monsters B]
Replace Parameters: Baron's Platoon
action_identifier, init: Baron Squad

As long as you keep the right order--Munger name, Action 1, parameter 1, Action 2, parameter 2, etc.--your Munger will do what you want it to.

By the way, what I just did is something like what happens in The Baron. The Baron's platoon goes from having the Baron and Stygs as seperate squads to just having the Baron, which allows the Stygs to break off and attack the player while the Baron goes on with his Platoon as before.

Does this help?
User avatar
Khadrelt
Posts: 479
Joined: Tue Aug 29, 2006 2:59 pm
Location: Utah, USA
Contact:

Post by Khadrelt »

Yeah, that helps me, actually. I've always wondered what those mystical and terrible Munger things were...

It's always been like in the movies when someone says, "What's that?" and all anyone will tell them is, "You don't want to know."
The cake is a lie.
User avatar
Baak
Posts: 1109
Joined: Sat Mar 20, 2004 6:26 pm
Location: Mything

Post by Baak »

Excellent stuff, A-Red!! :D

There are many scripting things like this need to be explained this well. :)


One of the great mysteries for me is precisely how to generate the proper "custom" actions - that is, the proper action + parameters - and how some things are obje and some are subj, etc. I feel that if I could see a "manual" of all the available combinations and what they would be used for I could come up with some really interesting stuff.

That whole chunk is still somewhat mysterious to me - although I have gotten it working in scripts by trial and error and mainly by looking at other scripts that I know work. Examples are my favorite way of learning.
Graydon
Posts: 1605
Joined: Sun Mar 21, 2004 5:10 pm

Post by Graydon »

Well there's only so many types of field names you can attach to a monster.... ones that I know of are subj (Subject), obje (Object), enem (Enemy), and targ (Target).

Certain actions use certain types of field names for certain things. For example, the Geom paramters 'Tested Items Inside Field Name' and 'Tested Items Inside Location Field Name' use subject and object respectively, so if you were changing the way the geometry was looking for information you might have to change the field name in the munger.

It's all fairly simple if you can think out, and comprehend, the progression of the actions in your head before putting it down in script.

GL guys.
Image
User avatar
Fury IX
Posts: 254
Joined: Thu Oct 19, 2006 7:37 pm

Post by Fury IX »

Yea that helps alot. I get the basic idea of the munger but the order thing will help alot.
A-Red
Posts: 771
Joined: Fri Jul 23, 2004 8:36 pm

Post by A-Red »

To do custom flags, you just need to research a little. Find an example of the parameter you want to change (if you're Munging it, you've already got an instance of it), and see what it's name and type are. They're listed next to the parameter in Loathing, so you'll see something like this:

Parameter (type, name)
e.g.
Initial Squads (action_identifier, init)

The part in parentheses is what you use for the custom flag.

In addition to the ones Gray mentioned, monsters can be cent (centerpoint) and dest (destination, like for a MOMA).
Post Reply