Scripting more professionally

A forum for discussing map making ideas and problems for the Myth series.
The Vile
Posts: 43
Joined: Wed Oct 24, 2007 10:28 am
Location: Rio de Janeiro

Scripting more professionally

Post by The Vile »

People from ProjectMagma, I have some doubts I'd like to clear about map scripting - let's say, in a more professional way.

1 - Some colors about COLLECTIONS cannot be changed. For example, Emperor Alric in Myth II clads a red armor with golden helmet (these colors can't be modified), but in Gugusm's plugin "Imprisoned", shows Alric clones as "stage bosses" with the same collection - but wearing black armor instead of red, with a silver helmet instead of golden? If these colors can't be changed via Fear, how can I do them?

2 - How can I create an inventory for a unit, or if a unit already has an inventory how can I modify it or alter the order of the artifacts it carries inside it?

3 - Speaking about inventory, let's suppose I am programming an enemy unit who has 2 standard attacks (one is a projectile for long or medium range and the other is a staff swing for hand-to-hand combat) and 2 special abilities (one shoots at medium/long range a powerful spell and the other allows him to summon other units as minions to aid him in combat). Case possible, is there a way to force this enemy to choose one between several special abilities in his inventory to use against the player units? Or it can be done only on the first one in the inventory?

4 - How do you program an enemy unit to hack at your back or quit attacking you? Consider those lone Myrmidons from Myth TFL mission Pools of Iron. If Alric faces towards a Myrmidon he'll turn his back and flee like a rat, but when Alric turns his back then the Myrmidon will return and try to back-attack cowardly. The groups of Myrmidons, however, will always attack Alric, whatever he faces them or not.

5 - When a CPU-controlled unit gets too far away from you, it turns to you and tells you to wait/follow him. Examples: Myth TFL mission Out of the Barrier, when the five heroes get too far from Alric, he'll follow them saying "Wait for me!"; in mission Silvermies, where the CPU-controlled Journeyman tells you to follow him; or Myth II mission Down a Broken Path, where Rurik orders you to follow him and retreats when there are enemies ahead. How can I script this?

Forgive me if I'm asking too much in a single topic, I'm just trying to learn the thing. These are the only doubts I have for the time being.

Okay, I'm going for now...
If ya wanna war, come into! I'll be waiting for you!
User avatar
Pyro
Bug Finder Extraordinaire
Posts: 4751
Joined: Sun Mar 21, 2004 2:14 pm
Location: Texas

Re: Scripting more professionally

Post by Pyro »

The Vile wrote:1 - Some colors about COLLECTIONS cannot be changed. For example, Emperor Alric in Myth II clads a red armor with golden helmet (these colors can't be modified), but in Gugusm's plugin "Imprisoned", shows Alric clones as "stage bosses" with the same collection - but wearing black armor instead of red, with a silver helmet instead of golden? If these colors can't be changed via Fear, how can I do them?
You need a collection editor to do this. Amber is a classic Mac OS collection editor. Oak is a newer (and currently in beta) cross-platform Myth editting suite which includes a collection editor. You give the collection a hue change which makes it alter a specific range of color. So whoever messed with the Alric collection you saw, made the red colors hue changable and the gold colors as well. It isn't a flawless process though. For example if you tried to give The Summoner's dark brown colors a hue change, it would look dark all the time. No matter what color you change it too. Which is why collections use very light colors for certain areas.
The Vile wrote:2 - How can I create an inventory for a unit, or if a unit already has an inventory how can I modify it or alter the order of the artifacts it carries inside it?
The monster tag has a flag somewhere that says the monster can hold multiple artifacts. Check that flag. Give it a max number it can hold (9 is the limit). Now when you make or alter an artifact tag, you can make it so only a certain type of monster can use it or pick it up. You just link it to the monster of your choosing.
The Vile wrote:3 - Speaking about inventory, let's suppose I am programming an enemy unit who has 2 standard attacks (one is a projectile for long or medium range and the other is a staff swing for hand-to-hand combat) and 2 special abilities (one shoots at medium/long range a powerful spell and the other allows him to summon other units as minions to aid him in combat). Case possible, is there a way to force this enemy to choose one between several special abilities in his inventory to use against the player units? Or it can be done only on the first one in the inventory?
There is a parameter in the Unit Control MA that makes a unit switch to a different artifact in their inventory. Take a look at the Loathing Mapmaking Doc that comes with Fear/Loathing for more info.
The Vile wrote:4 - How do you program an enemy unit to hack at your back or quit attacking you? Consider those lone Myrmidons from Myth TFL mission Pools of Iron. If Alric faces towards a Myrmidon he'll turn his back and flee like a rat, but when Alric turns his back then the Myrmidon will return and try to back-attack cowardly. The groups of Myrmidons, however, will always attack Alric, whatever he faces them or not.
Look at the scripting and figure it out. Since you can't look into TFL maps, you can however look in The Fallen Levels script. Just use UnTag to extract all the tags into an empty local folder. Then use Loathing to look at the scripting.
The Vile wrote:5 - When a CPU-controlled unit gets too far away from you, it turns to you and tells you to wait/follow him. Examples: Myth TFL mission Out of the Barrier, when the five heroes get too far from Alric, he'll follow them saying "Wait for me!"; in mission Silvermies, where the CPU-controlled Journeyman tells you to follow him; or Myth II mission Down a Broken Path, where Rurik orders you to follow him and retreats when there are enemies ahead. How can I script this?
Why don't you look at the scripting for those maps? They use the Leading MA (Map Action) and Out of the Barrier uses the Follow MA. Take a look a the Loathing Mapmaking Doc that comes with Fear/Loathing.
Graydon
Posts: 1605
Joined: Sun Mar 21, 2004 5:10 pm

Re: Scripting more professionally

Post by Graydon »

All of those things are very possible with the right usage of scripting.

Many of your questions can be researched and answered yourself simply by looking at the bungie script on the example maps you mentioned for various cases. Often one of hte best ways to learn is study, replicate, and then tweak what Bungie's script looks like.

Your first questions regarding alric, is done by editing the Collection tag and some values within (specifically which colours are affected by 'hue change').

I don't know about others, but I'm going to refuse to give any more details on the above until you change your font colour to something that isnt going to cause me to go blind.
Image
The Vile
Posts: 43
Joined: Wed Oct 24, 2007 10:28 am
Location: Rio de Janeiro

Re: Scripting more professionally

Post by The Vile »

Holy cow! I knew I'd have an answer, but that was a truly mumbo-jumbo doubtkiller! Kudos for Pyro and Graydon! And, Graydon...
Graydon wrote:All of those things are very possible with the right usage of scripting.

Many of your questions can be researched and answered yourself simply by looking at the bungie script on the example maps you mentioned for various cases. Often one of hte best ways to learn is study, replicate, and then tweak what Bungie's script looks like.

Your first questions regarding alric, is done by editing the Collection tag and some values within (specifically which colours are affected by 'hue change').

I don't know about others, but I'm going to refuse to give any more details on the above until you change your font colour to something that isnt going to cause me to go blind.
Please don't be mad with me, I chose blue because is my favourite colour, I have no intention of exhausting anyone's retins here, ok? Be cool! :D
If ya wanna war, come into! I'll be waiting for you!
Graydon
Posts: 1605
Joined: Sun Mar 21, 2004 5:10 pm

Re: Scripting more professionally

Post by Graydon »

So'k, that's more tolerable of a blue.

Most of us use the "Magma Red" forum theme skin, and blue just contrasts horribly in general with it. That bright blue before was particularly bad. Since you've changed it I'll be willing to give more specific details if you need them.
Image
GodzFire
Posts: 1774
Joined: Wed Nov 02, 2005 8:37 pm

Re: Scripting more professionally

Post by GodzFire »

DEAR GOD MY EYES!
User avatar
Melekor
Site Admin
Posts: 2449
Joined: Sat May 01, 2004 12:10 am
Contact:

Re: Scripting more professionally

Post by Melekor »

Blue removed. Please don't abuse the color feature.
Graydon
Posts: 1605
Joined: Sun Mar 21, 2004 5:10 pm

Re: Scripting more professionally

Post by Graydon »

Melekor wrote:Blue removed. Please don't abuse the color feature.
Is it possible that the blue actually works ok on the default forum theme? It's kind of blueish in itself anyway. I personally appreciate your edit, however, I'm not so sure Vile was intentionally abusing colours. His questions seemed pretty genuine, I don't think he'd be asking genuine questions and trying to abuse the other users at the same time. :)
Image
User avatar
haravikk
Site Admin
Posts: 987
Joined: Mon Mar 22, 2004 12:56 pm
Location: Scotland

Re: Scripting more professionally

Post by haravikk »

The Vile wrote:4 - How do you program an enemy unit to hack at your back or quit attacking you? Consider those lone Myrmidons from Myth TFL mission Pools of Iron. If Alric faces towards a Myrmidon he'll turn his back and flee like a rat, but when Alric turns his back then the Myrmidon will return and try to back-attack cowardly. The groups of Myrmidons, however, will always attack Alric, whatever he faces them or not.
Regarding this, you want the Harass map-action (displayed with the abbreviation of GIRL in the actions list), which is most commonly used by Ghôls. The Assassin (ASSA) action is also meant for this, however it lacks many of the features of the Harass action, making it more specialised for Mahir only, i.e - units that don't have any fear of being stuck by arrows when they're moving.

If you look on many Myth 2 maps you can see examples of the Harass action in use, no need to go digging in the TFL maps unless they particularly interest you.
Being Haravikk gets you girls like these:
Image
User avatar
Melekor
Site Admin
Posts: 2449
Joined: Sat May 01, 2004 12:10 am
Contact:

Re: Scripting more professionally

Post by Melekor »

Graydon wrote:
Melekor wrote:Blue removed. Please don't abuse the color feature.
Is it possible that the blue actually works ok on the default forum theme? It's kind of blueish in itself anyway. I personally appreciate your edit, however, I'm not so sure Vile was intentionally abusing colours. His questions seemed pretty genuine, I don't think he'd be asking genuine questions and trying to abuse the other users at the same time. :)
Oh, I'm sure he wasn't, but still. Overriding the color of every post is abuse of the color feature. I'm just saying, please don't do that.
The Vile
Posts: 43
Joined: Wed Oct 24, 2007 10:28 am
Location: Rio de Janeiro

Re: Scripting more professionally

Post by The Vile »

Melekor wrote:
Graydon wrote:
Melekor wrote:Blue removed. Please don't abuse the color feature.
Is it possible that the blue actually works ok on the default forum theme? It's kind of blueish in itself anyway. I personally appreciate your edit, however, I'm not so sure Vile was intentionally abusing colours. His questions seemed pretty genuine, I don't think he'd be asking genuine questions and trying to abuse the other users at the same time. :)
Oh, I'm sure he wasn't, but still. Overriding the color of every post is abuse of the color feature. I'm just saying, please don't do that.
Indeed, both you are right. I said and repeat: NOT intended to burn off anyone's eyes in here, so I expect nobody here to understand me bad. I now recognise the "color overriding" question, so no more with this (at least from my part)...
If ya wanna war, come into! I'll be waiting for you!
vinylrake
Posts: 3591
Joined: Wed Apr 07, 2004 12:52 pm
Location: here
Contact:

Re: Scripting more professionally

Post by vinylrake »

Graydon wrote: Most of us use the "Magma Red" forum theme skin, and blue just contrasts horribly in general with it....
Seriously? "Most" people here use the Magma Red theme? Talk about "MY EYES MY EYES OMG IT BURNS!!!" , I think if you use the MagmaRed theme you give up any right to complain about the contrast of anyone else's posts.

Oh and by the way? That offer I made to let you redecorate my house? Not. Going. To. Happen.

ps. No offense meant to whoever developed the color scheme, I just have a pathological aversion to color schemes of light text on dark backgrounds.

pps. Oh, and by "pathological aversion" I meant "the aversion any sane person would have to a red,orange and brown color scheme".
User avatar
Pyro
Bug Finder Extraordinaire
Posts: 4751
Joined: Sun Mar 21, 2004 2:14 pm
Location: Texas

Re: Scripting more professionally

Post by Pyro »

Then I must be insane. :wink:
User avatar
haravikk
Site Admin
Posts: 987
Joined: Mon Mar 22, 2004 12:56 pm
Location: Scotland

Re: Scripting more professionally

Post by haravikk »

Likewise, I've been using the theme since it was introduced, I just the private message backgrounds and a few other boxes go fixed so we don't have light text on white :P

That and my web-sites tend to use dark backgrounds with light text, though my current web-sites overhaul has fallen by the way-side a bit leaving all of my sites a bit incomplete =S
Being Haravikk gets you girls like these:
Image
Deqlyn
Posts: 387
Joined: Thu Dec 13, 2007 6:27 pm

Re: Scripting more professionally

Post by Deqlyn »

I dont see any colors. I must be color blind.
Post Reply