Page 1 of 1
Text editor
Posted: Thu Nov 09, 2006 11:30 am
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.
Posted: Thu Nov 09, 2006 3:34 pm
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.
Posted: Thu Nov 09, 2006 5:09 pm
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.
Posted: Thu Nov 09, 2006 6:05 pm
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
Posted: Thu Nov 09, 2006 6:25 pm
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.
Posted: Thu Nov 09, 2006 6:39 pm
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!" ?
Posted: Thu Nov 09, 2006 8:25 pm
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".
Posted: Thu Nov 09, 2006 8:59 pm
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?
Posted: Thu Nov 09, 2006 9:29 pm
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."
Posted: Thu Nov 09, 2006 9:39 pm
by Baak
Excellent stuff, A-Red!!
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.
Posted: Thu Nov 09, 2006 10:46 pm
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.
Posted: Fri Nov 10, 2006 12:33 am
by Fury IX
Yea that helps alot. I get the basic idea of the munger but the order thing will help alot.
Posted: Fri Nov 10, 2006 1:54 am
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).