Inevitable questions.

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
toms
Posts: 1717
Joined: November 6th, 2005, 2:15 pm

Post by toms »

SmokemJags wrote:Took out the [macro] tags
I thought it was like
[story] and [/story] tags in the story.cfg.
If you make an own file for the story, you have to define the story parts and insert the macro in the scenario file. Like this.

Code: Select all

#define STORY_BEGINNING
[story]
 [part]
 story=_"This is the intro, defined in a seperate file"
 [/part]
[/story]
#enddef
##And in the scenario file,
{STORY_BEGINNING}
First read, then think. Read again, think again. And then post!
SmokemJags
Posts: 580
Joined: February 14th, 2006, 3:24 am
Location: New Avalon
Contact:

Post by SmokemJags »

Code: Select all

	[event]
	name=new turn
	first_time_only=no
		{MODIFY_UNIT (type=Orcish Archer) goto_x 50} 
		{MODIFY_UNIT (type=Orcish Archer) goto_y 14}
	[/event]
Is the event.

Code: Select all

# MODIFY_UNIT alters a unit variable (such as unit.x, unit.type,
# unit.side), handling all the storing and unstoring.
#
# Example that flips all spearmen to side 2:
# {MODIFY_UNIT type=Spearman side 2}
#define MODIFY_UNIT FILTER VAR VALUE
    [store_unit]
        [filter]
            {FILTER}
        [/filter]
        variable=MODIFY_UNIT_store
        kill=yes
    [/store_unit]
    {FOREACH MODIFY_UNIT_store MODIFY_UNIT_i}
        [set_variable]
            name=MODIFY_UNIT_store[$MODIFY_UNIT_i].{VAR}
            value={VALUE}
        [/set_variable]
        [unstore_unit]
            variable=MODIFY_UNIT_store[$MODIFY_UNIT_i]
            find_vacant=no
        [/unstore_unit]
    {NEXT MODIFY_UNIT_i}
    {CLEAR_VARIABLE MODIFY_UNIT_store}
#enddef
Is the entire utils.cfg file.

Code: Select all

	{@campaigns/Unnatural_Corruption/utils/utils.cfg}
Is the line included in both the scenario file and the campaign file.

It still isn't working.
What do I need to change so it cooperates, or just wait for 1.1.2?
"A wise man speaks when he has something to say. A fool speaks when he has to say something."
Dacyn
Posts: 1855
Joined: May 1st, 2004, 9:34 am
Location: Texas

Post by Dacyn »

toms wrote:aggression=between 0 and 1(more makes not much sense)
Aggression measures how much HP of your units are worth in relation to his when he is attacking... any value below 1 is valid. 0 means that your units are worh the same as his; other than that it is logarithmic (with 1 being infinitely high)... 0.5 (your units are twice as valuable as his) is default.
Caution measures how much the AI tries to get into a good defensive position i.e. retreating to a defensive terrain, forming larger groups.

It is all explained at AiWML
SmokemJags
Posts: 580
Joined: February 14th, 2006, 3:24 am
Location: New Avalon
Contact:

Post by SmokemJags »

Instead of waiting for 1.1.2 to come out...

Would it be possible to use the [target] tag and set that as hex 50,14? Target seems to only be to tell the AI to specifically target certain units... but if [avoid] can be used to make the AI not go somewhere as seen here:
x, y standard coordinates- A location for the AI to avoid moving to.
shouldn't there be something that tells the AI to target a hex? Something other than leader_goal, which applies to the leader only.

I wonder if I could just program the AI to avoid every hex... except a pre-determined path to 50,14...
"A wise man speaks when he has something to say. A fool speaks when he has to say something."
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

Actually, I just realized that the [macro] [/macro] tags are irrelevant - they have no effect whatsoever, good or bad. It doesn't hurt to have them in, but it is still probably best to remove them - doesn't confuse people reading your code.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
Post Reply